提交 51399762 编写于 作者: G Ganlin Zhao

fix test cases

上级 2bc95eeb
...@@ -13,11 +13,11 @@ class TDTestCase: ...@@ -13,11 +13,11 @@ class TDTestCase:
tdLog.debug(f"start to excute {__file__}") tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor()) tdSql.init(conn.cursor())
# name of normal table # name of normal table
self.ntbname = 'ntb' self.ntbname = 'ntb'
# name of stable # name of stable
self.stbname = 'stb' self.stbname = 'stb'
# structure of column # structure of column
self.column_dict = { self.column_dict = {
'ts':'timestamp', 'ts':'timestamp',
'c1':'int', 'c1':'int',
'c2':'float', 'c2':'float',
...@@ -25,13 +25,13 @@ class TDTestCase: ...@@ -25,13 +25,13 @@ class TDTestCase:
'c4':'nchar(20)' 'c4':'nchar(20)'
} }
# structure of tag # structure of tag
self.tag_dict = { self.tag_dict = {
't0':'int' 't0':'int'
} }
# number of child tables # number of child tables
self.tbnum = 2 self.tbnum = 2
# values of tag,the number of values should equal to tbnum # values of tag,the number of values should equal to tbnum
self.tag_values = [ self.tag_values = [
f'10', f'10',
f'100' f'100'
] ]
...@@ -42,7 +42,7 @@ class TDTestCase: ...@@ -42,7 +42,7 @@ class TDTestCase:
] ]
self.error_param = [1,'now()'] self.error_param = [1,'now()']
def run(self): # sourcery skip: extract-duplicate-method def run(self): # sourcery skip: extract-duplicate-method
tdSql.prepare() tdSql.prepare()
tdLog.printNoPrefix("==========step1:create tables==========") tdLog.printNoPrefix("==========step1:create tables==========")
...@@ -93,11 +93,11 @@ class TDTestCase: ...@@ -93,11 +93,11 @@ class TDTestCase:
tdSql.query("select ts from ntb where to_unixtimestamp('1970-01-01T08:00:00+08:00')=0") tdSql.query("select ts from ntb where to_unixtimestamp('1970-01-01T08:00:00+08:00')=0")
tdSql.checkRows(3) tdSql.checkRows(3)
def stop(self): def stop(self):
tdSql.close() tdSql.close()
tdLog.success(f"{__file__} successfully executed") tdLog.success(f"{__file__} successfully executed")
tdCases.addLinux(__file__, TDTestCase()) tdCases.addLinux(__file__, TDTestCase())
tdCases.addWindows(__file__, TDTestCase()) tdCases.addWindows(__file__, TDTestCase())
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册