From b7bb08d66516804a621156d78f7ba5e26acef2d6 Mon Sep 17 00:00:00 2001 From: jiacy-jcy Date: Fri, 24 Jun 2022 09:12:47 +0800 Subject: [PATCH] update test case --- tests/system-test/2-query/Now.py | 43 +++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/tests/system-test/2-query/Now.py b/tests/system-test/2-query/Now.py index 9d073eb4f7..a5c2a93aa4 100644 --- a/tests/system-test/2-query/Now.py +++ b/tests/system-test/2-query/Now.py @@ -3,14 +3,55 @@ from util.dnodes import * from util.log import * from util.sql import * from util.cases import * - +from util.sqlset import * class TDTestCase: def init(self, conn, logSql): tdLog.debug(f"start to excute {__file__}") tdSql.init(conn.cursor()) + self.setsql = TDSetSql() + # name of normal table + self.ntbname = 'ntb' + # name of stable + self.stbname = 'stb' + # structure of column + self.column_dict = { + 'ts':'timestamp', + 'c1':'int', + 'c2':'float', + 'c3':'double' + } + # structure of tag + self.tag_dict = { + 't0':'int' + } + # number of child tables + self.tbnum = 2 + # values of tag,the number of values should equal to tbnum + self.tag_values = [ + f'10', + f'100' + ] + self.values_list = [ + f'now,10,99.99,11.111111', + f'today(),100,11.111,22.222222' + ] + self.time_unit = ['b','u','a','s','m','h','d','w'] + + def now_check_ntb(self): + tdSql.prepare() + tdSql.execute(self.setsql.set_create_normaltable_sql(self.ntbname,self.column_dict)) + for value in self.values_list: + tdSql.execute( + f'insert into {self.ntbname} values({value})') + + + + pass + def now_check_stb(self): + pass def run(self): # sourcery skip: extract-duplicate-method # for func now() , today(), timezone() tdSql.prepare()