提交 74f3902a 编写于 作者: C cpwu

fix case

上级 5efb1a4f
...@@ -221,8 +221,8 @@ class TDTestCase: ...@@ -221,8 +221,8 @@ class TDTestCase:
for i in range(len(sqls)): for i in range(len(sqls)):
tdSql.query(sqls[i]) tdSql.query(sqls[i])
res1_type = self.__get_type(0) res1_type = self.__get_type(0)
for j in range(sqls[i:]): for j in range(len(sqls[i:])):
tdSql.query(sqls[j]) tdSql.query(sqls[j+i])
union_type = False union_type = False
res2_type = self.__get_type(0) res2_type = self.__get_type(0)
...@@ -236,18 +236,17 @@ class TDTestCase: ...@@ -236,18 +236,17 @@ class TDTestCase:
union_type = True union_type = True
if union_type: if union_type:
tdSql.query(f"{sqls[i]} union {sqls[j]}") tdSql.query(f"{sqls[i]} union {sqls[j+i]}")
tdSql.query(f"{sqls[j]} union {sqls[i]}") tdSql.query(f"{sqls[j+i]} union {sqls[i]}")
tdSql.checkCols(1) tdSql.checkCols(1)
tdSql.query(f"{sqls[i]} union all {sqls[j]}") tdSql.query(f"{sqls[i]} union all {sqls[j+i]}")
tdSql.query(f"{sqls[j]} union all {sqls[i]}") tdSql.query(f"{sqls[j+i]} union all {sqls[i]}")
tdSql.checkCols(1) tdSql.checkCols(1)
else: else:
tdSql.error(f"{sqls[i]} union {sqls[j]}") tdSql.error(f"{sqls[i]} union {sqls[j+i]}")
def __test_error(self): def __test_error(self):
tdSql.error( "show tables union show tables" ) tdSql.error( "show tables union show tables" )
tdSql.error( "create table errtb1 union all create table errtb2" ) tdSql.error( "create table errtb1 union all create table errtb2" )
tdSql.error( "drop table ct1 union all drop table ct3" ) tdSql.error( "drop table ct1 union all drop table ct3" )
......
...@@ -220,8 +220,8 @@ class TDTestCase: ...@@ -220,8 +220,8 @@ class TDTestCase:
for i in range(len(sqls)): for i in range(len(sqls)):
tdSql.query(sqls[i]) tdSql.query(sqls[i])
res1_type = self.__get_type(0) res1_type = self.__get_type(0)
for j in range(sqls[i:]): for j in range(len(sqls[i:])):
tdSql.query(sqls[j]) tdSql.query(sqls[j+i])
union_type = False union_type = False
res2_type = self.__get_type(0) res2_type = self.__get_type(0)
...@@ -235,19 +235,17 @@ class TDTestCase: ...@@ -235,19 +235,17 @@ class TDTestCase:
union_type = True union_type = True
if union_type: if union_type:
tdSql.query(f"{sqls[i]} union {sqls[j]}") tdSql.query(f"{sqls[i]} union {sqls[j+i]}")
tdSql.query(f"{sqls[j]} union {sqls[i]}") tdSql.query(f"{sqls[j+i]} union {sqls[i]}")
tdSql.checkCols(1) tdSql.checkCols(1)
tdSql.query(f"{sqls[i]} union all {sqls[j]}") tdSql.query(f"{sqls[i]} union all {sqls[j+i]}")
tdSql.query(f"{sqls[j]} union all {sqls[i]}") tdSql.query(f"{sqls[j+i]} union all {sqls[i]}")
tdSql.checkCols(1) tdSql.checkCols(1)
else: else:
tdSql.error(f"{sqls[i]} union {sqls[j]}") tdSql.error(f"{sqls[i]} union {sqls[j+i]}")
def __test_error(self): def __test_error(self):
tdSql.error( "show tables union show tables" ) tdSql.error( "show tables union show tables" )
tdSql.error( "create table errtb1 union all create table errtb2" ) tdSql.error( "create table errtb1 union all create table errtb2" )
tdSql.error( "drop table ct1 union all drop table ct3" ) tdSql.error( "drop table ct1 union all drop table ct3" )
......
...@@ -221,8 +221,8 @@ class TDTestCase: ...@@ -221,8 +221,8 @@ class TDTestCase:
for i in range(len(sqls)): for i in range(len(sqls)):
tdSql.query(sqls[i]) tdSql.query(sqls[i])
res1_type = self.__get_type(0) res1_type = self.__get_type(0)
for j in range(sqls[i:]): for j in range(len(sqls[i:])):
tdSql.query(sqls[j]) tdSql.query(sqls[j+i])
union_type = False union_type = False
res2_type = self.__get_type(0) res2_type = self.__get_type(0)
...@@ -236,18 +236,17 @@ class TDTestCase: ...@@ -236,18 +236,17 @@ class TDTestCase:
union_type = True union_type = True
if union_type: if union_type:
tdSql.query(f"{sqls[i]} union {sqls[j]}") tdSql.query(f"{sqls[i]} union {sqls[j+i]}")
tdSql.query(f"{sqls[j]} union {sqls[i]}") tdSql.query(f"{sqls[j+i]} union {sqls[i]}")
tdSql.checkCols(1) tdSql.checkCols(1)
tdSql.query(f"{sqls[i]} union all {sqls[j]}") tdSql.query(f"{sqls[i]} union all {sqls[j+i]}")
tdSql.query(f"{sqls[j]} union all {sqls[i]}") tdSql.query(f"{sqls[j+i]} union all {sqls[i]}")
tdSql.checkCols(1) tdSql.checkCols(1)
else: else:
tdSql.error(f"{sqls[i]} union {sqls[j]}") tdSql.error(f"{sqls[i]} union {sqls[j+i]}")
def __test_error(self): def __test_error(self):
tdSql.error( "show tables union show tables" ) tdSql.error( "show tables union show tables" )
tdSql.error( "create table errtb1 union all create table errtb2" ) tdSql.error( "create table errtb1 union all create table errtb2" )
tdSql.error( "drop table ct1 union all drop table ct3" ) tdSql.error( "drop table ct1 union all drop table ct3" )
......
...@@ -221,8 +221,8 @@ class TDTestCase: ...@@ -221,8 +221,8 @@ class TDTestCase:
for i in range(len(sqls)): for i in range(len(sqls)):
tdSql.query(sqls[i]) tdSql.query(sqls[i])
res1_type = self.__get_type(0) res1_type = self.__get_type(0)
for j in range(sqls[i:]): for j in range(len(sqls[i:])):
tdSql.query(sqls[j]) tdSql.query(sqls[j+i])
union_type = False union_type = False
res2_type = self.__get_type(0) res2_type = self.__get_type(0)
...@@ -236,18 +236,17 @@ class TDTestCase: ...@@ -236,18 +236,17 @@ class TDTestCase:
union_type = True union_type = True
if union_type: if union_type:
tdSql.query(f"{sqls[i]} union {sqls[j]}") tdSql.query(f"{sqls[i]} union {sqls[j+i]}")
tdSql.query(f"{sqls[j]} union {sqls[i]}") tdSql.query(f"{sqls[j+i]} union {sqls[i]}")
tdSql.checkCols(1) tdSql.checkCols(1)
tdSql.query(f"{sqls[i]} union all {sqls[j]}") tdSql.query(f"{sqls[i]} union all {sqls[j+i]}")
tdSql.query(f"{sqls[j]} union all {sqls[i]}") tdSql.query(f"{sqls[j+i]} union all {sqls[i]}")
tdSql.checkCols(1) tdSql.checkCols(1)
else: else:
tdSql.error(f"{sqls[i]} union {sqls[j]}") tdSql.error(f"{sqls[i]} union {sqls[j+i]}")
def __test_error(self): def __test_error(self):
tdSql.error( "show tables union show tables" ) tdSql.error( "show tables union show tables" )
tdSql.error( "create table errtb1 union all create table errtb2" ) tdSql.error( "create table errtb1 union all create table errtb2" )
tdSql.error( "drop table ct1 union all drop table ct3" ) tdSql.error( "drop table ct1 union all drop table ct3" )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册