From eb8d630d2ceac2b2dd1785589dd76ddeaf96c8ab Mon Sep 17 00:00:00 2001 From: cpwu Date: Mon, 9 May 2022 00:20:40 +0800 Subject: [PATCH] fix case --- tests/system-test/2-query/ltrim.py | 6 +++--- tests/system-test/2-query/rtrim.py | 6 +++--- tests/system-test/2-query/substr.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/system-test/2-query/ltrim.py b/tests/system-test/2-query/ltrim.py index af49811a29..ef3fd3de21 100644 --- a/tests/system-test/2-query/ltrim.py +++ b/tests/system-test/2-query/ltrim.py @@ -45,7 +45,7 @@ class TDTestCase: ltrim_condition.extend( f"cast( {bool_col} as binary(16) )" for bool_col in BOOLEAN_COL ) ltrim_condition.extend( f"cast( {char_col} + {bool_col} as binary(16) )" for bool_col in BOOLEAN_COL ) ltrim_condition.extend( f"cast( {ts_col} as binary(16) )" for ts_col in TS_TYPE_COL ) - ltrim_condition.extend( f"cast( {char_col} + {ts_col} as binary(16) )" for ts_col in TS_TYPE_COL ) + # ltrim_condition.extend( f"cast( {char_col} + {ts_col} as binary(16) )" for ts_col in TS_TYPE_COL ) ltrim_condition.extend( f"cast( {char_col} + {char_col_2} as binary(16) ) " for char_col_2 in CHAR_COL ) ltrim_condition.extend( f"concat( {char_col}, {char_col_2} ) " for char_col_2 in CHAR_COL ) @@ -76,7 +76,7 @@ class TDTestCase: tdSql.query(f"select ltrim( {condition}) , {condition} from {tbname} ") for j in range(tdSql.queryRows): - tdSql.checkData(j,0, tdSql.getData(j,1).lstrip()) + tdSql.checkData(j,0, tdSql.getData(j,1).lstrip()) if tdSql.getData(j,1) else tdSql.checkData(j, 0, None) [ tdSql.query(f"select ltrim({condition}) from {tbname} {where_condition} {group} ") for group in groups ] @@ -125,7 +125,7 @@ class TDTestCase: tbname = ["ct1", "ct2", "ct4", "t1", "stb1"] for tb in tbname: self.__ltrim_check(tb) - tdLog.printNoPrefix(f"==========current sql condition check in {tb}, col num: {i} over==========") + tdLog.printNoPrefix(f"==========current sql condition check in {tb} over==========") def __test_error(self): tdLog.printNoPrefix("==========err sql condition check , must return error==========") diff --git a/tests/system-test/2-query/rtrim.py b/tests/system-test/2-query/rtrim.py index 3cced8dbdb..f99145b7b1 100644 --- a/tests/system-test/2-query/rtrim.py +++ b/tests/system-test/2-query/rtrim.py @@ -51,7 +51,7 @@ class TDTestCase: for num_col in NUM_COL: rtrim_condition.extend( f"cast( {num_col} + {bool_col} as binary(16) )" for bool_col in BOOLEAN_COL ) - rtrim_condition.extend( f"cast( {num_col} + {ts_col} as binary(16) )" for ts_col in TS_TYPE_COL ) + rtrim_condition.extend( f"cast( {num_col} + {ts_col} as binary(16) )" for ts_col in TS_TYPE_COL if num_col is not FLOAT_COL and num_col is not DOUBLE_COL ) rtrim_condition.extend( f"cast( {bool_col} + {ts_col} as binary(16) )" for bool_col in BOOLEAN_COL for ts_col in TS_TYPE_COL ) @@ -76,7 +76,7 @@ class TDTestCase: tdSql.query(f"select rtrim( {condition}) , {condition} from {tbname} ") for j in range(tdSql.queryRows): - tdSql.checkData(j,0, tdSql.getData(j,1).rstrip()) + tdSql.checkData(j,0, tdSql.getData(j,1).rstrip()) if tdSql.getData(j,1) else tdSql.checkData(j, 0, None) [ tdSql.query(f"select rtrim({condition}) from {tbname} {where_condition} {group} ") for group in groups ] @@ -125,7 +125,7 @@ class TDTestCase: tbname = ["ct1", "ct2", "ct4", "t1", "stb1"] for tb in tbname: self.__rtrim_check(tb) - tdLog.printNoPrefix(f"==========current sql condition check in {tb}, col num: {i} over==========") + tdLog.printNoPrefix(f"==========current sql condition check in {tb} over==========") def __test_error(self): tdLog.printNoPrefix("==========err sql condition check , must return error==========") diff --git a/tests/system-test/2-query/substr.py b/tests/system-test/2-query/substr.py index 5fed3762e8..1b3b5895f4 100644 --- a/tests/system-test/2-query/substr.py +++ b/tests/system-test/2-query/substr.py @@ -51,7 +51,7 @@ class TDTestCase: for num_col in NUM_COL: substr_condition.extend( f"cast( {num_col} + {bool_col} as binary(16) )" for bool_col in BOOLEAN_COL ) - substr_condition.extend( f"cast( {num_col} + {ts_col} as binary(16) )" for ts_col in TS_TYPE_COL ) + substr_condition.extend( f"cast( {num_col} + {ts_col} as binary(16) )" for ts_col in TS_TYPE_COL if num_col is not FLOAT_COL and num_col is not DOUBLE_COL) substr_condition.extend( f"cast( {bool_col} + {ts_col} as binary(16) )" for bool_col in BOOLEAN_COL for ts_col in TS_TYPE_COL ) -- GitLab