From be9fec5f1b790926ad5c0347d6fb6d36db0f56bb Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 21 Jul 2022 19:31:28 +0800 Subject: [PATCH] fix(test): fix test cases --- tests/system-test/2-query/Now.py | 16 ++++++++-------- tests/system-test/2-query/irate.py | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/system-test/2-query/Now.py b/tests/system-test/2-query/Now.py index 3caf632209..386c8b9d31 100644 --- a/tests/system-test/2-query/Now.py +++ b/tests/system-test/2-query/Now.py @@ -12,24 +12,24 @@ class TDTestCase: tdSql.init(conn.cursor(),True) self.setsql = TDSetSql() # name of normal table - self.ntbname = 'ntb' + self.ntbname = 'ntb' # name of stable - self.stbname = 'stb' + self.stbname = 'stb' # structure of column - self.column_dict = { + self.column_dict = { 'ts':'timestamp', 'c1':'int', 'c2':'float', 'c3':'double' } # structure of tag - self.tag_dict = { + self.tag_dict = { 't0':'int' } # number of child tables - self.tbnum = 2 + self.tbnum = 2 # values of tag,the number of values should equal to tbnum - self.tag_values = [ + self.tag_values = [ f'10', f'100' ] @@ -43,7 +43,7 @@ class TDTestCase: self.db_percision = ['ms','us','ns'] def tbtype_check(self,tb_type): if tb_type == 'normal table' or tb_type == 'child table': - tdSql.checkRows(len(self.values_list)) + tdSql.checkRows(len(self.values_list)) elif tb_type == 'stable': tdSql.checkRows(len(self.values_list) * self.tbnum) def data_check(self,tbname,tb_type): @@ -98,7 +98,7 @@ class TDTestCase: self.now_check_ntb() self.now_check_stb() - + def stop(self): tdSql.close() tdLog.success(f"{__file__} successfully executed") diff --git a/tests/system-test/2-query/irate.py b/tests/system-test/2-query/irate.py index e40920c06c..09a046d6ef 100644 --- a/tests/system-test/2-query/irate.py +++ b/tests/system-test/2-query/irate.py @@ -23,7 +23,7 @@ class TDTestCase: self.time_step = 1000 def insert_datas_and_check_irate(self ,tbnums , rownums , time_step ): - + tdLog.info(" prepare datas for auto check irate function ") tdSql.execute(" create database test ") @@ -48,7 +48,7 @@ class TDTestCase: c9 = "'nchar_val'" c10 = ts tdSql.execute(f" insert into {tbname} values ({ts},{c1},{c2},{c3},{c4},{c5},{c6},{c7},{c8},{c9},{c10})") - + tdSql.execute("use test") tbnames = ["stb", "sub_tb_1"] support_types = ["BIGINT", "SMALLINT", "TINYINT", "FLOAT", "DOUBLE", "INT"] @@ -204,11 +204,11 @@ class TDTestCase: # used for sub table tdSql.query("select irate(abs(c1+c2)) from ct1") tdSql.checkData(0, 0, 0.000000000) - + # mix with common col tdSql.error("select c1, irate(c1) from ct1") - + # mix with common functions tdSql.error("select irate(c1), abs(c1) from ct4 ") @@ -236,7 +236,7 @@ class TDTestCase: "select irate(c1+c2)/10 from stb1 where c1 = 5 partition by tbname ") tdSql.checkRows(2) tdSql.checkData(0, 0, 0.000000000) - + def irate_Arithmetic(self): pass