diff --git a/tests/pytest/regressiontest.sh b/tests/pytest/regressiontest.sh index 3b26aaf30d171efc158e587be2123636b023dd65..22cc9d9af2f8d3d2c6014ab5a6feabf0da4e05ea 100755 --- a/tests/pytest/regressiontest.sh +++ b/tests/pytest/regressiontest.sh @@ -38,9 +38,9 @@ python3 ./test.py -f tag_lite/bool_int.py python3 ./test.py -f tag_lite/bool.py python3 ./test.py -f tag_lite/change.py python3 ./test.py -f tag_lite/column.py -# python3 ./test.py -f tag_lite/commit.py +python3 ./test.py -f tag_lite/commit.py python3 ./test.py -f tag_lite/create.py -# python3 ./test.py -f tag_lite/datatype.py +python3 ./test.py -f tag_lite/datatype.py python3 ./test.py -f tag_lite/datatype-without-alter.py # python3 ./test.py -f tag_lite/delete.py python3 ./test.py -f tag_lite/double.py diff --git a/tests/pytest/tag_lite/commit.py b/tests/pytest/tag_lite/commit.py index 478520a58618571ed44d08c8efc3f14c60735888..8b69d4aa5f482340012c53a4be1c2b9c8c1b2e92 100644 --- a/tests/pytest/tag_lite/commit.py +++ b/tests/pytest/tag_lite/commit.py @@ -296,13 +296,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data23 != 1 then - tdLog.info('tdSql.checkData(2, 3, 1)') - tdSql.checkData(2, 3, 1) + tdLog.info('tdSql.checkData(2, 3, "TAG")') + tdSql.checkData(2, 3, "TAG") # TSIM: return -1 # TSIM: endi # TSIM: if $data33 != 2.000000 then - tdLog.info('tdSql.checkData(3, 3, 2.000000)') - tdSql.checkData(3, 3, 2.000000) + tdLog.info('tdSql.checkData(3, 3, "TAG")') + tdSql.checkData(3, 3, "TAG") # TSIM: return -1 # TSIM: endi # TSIM: @@ -395,8 +395,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 2 then - tdLog.info('tdSql.checkData(0, 3, 2)') - tdSql.checkData(0, 3, 2) + tdLog.info('tdSql.checkData(0, 3, "2")') + tdSql.checkData(0, 3, "2") # TSIM: return -1 # TSIM: endi # TSIM: @@ -552,13 +552,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 5 then - tdLog.info('tdSql.checkData(0, 3, 5)') - tdSql.checkData(0, 3, 5) + tdLog.info('tdSql.checkData(0, 3, "5")') + tdSql.checkData(0, 3, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 6 then - tdLog.info('tdSql.checkData(0, 4, 6)') - tdSql.checkData(0, 4, 6) + tdLog.info('tdSql.checkData(0, 4, "6")') + tdSql.checkData(0, 4, "6") # TSIM: return -1 # TSIM: endi # TSIM: @@ -583,13 +583,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 5 then - tdLog.info('tdSql.checkData(0, 3, 5)') - tdSql.checkData(0, 3, 5) + tdLog.info('tdSql.checkData(0, 3, "5")') + tdSql.checkData(0, 3, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 6 then - tdLog.info('tdSql.checkData(0, 4, 6)') - tdSql.checkData(0, 4, 6) + tdLog.info('tdSql.checkData(0, 4, "6")') + tdSql.checkData(0, 4, "6") # TSIM: return -1 # TSIM: endi # TSIM: @@ -653,8 +653,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 3 then - tdLog.info('tdSql.checkData(0, 4, 3)') - tdSql.checkData(0, 4, 3) + tdLog.info('tdSql.checkData(0, 4, "3")') + tdSql.checkData(0, 4, "3") # TSIM: return -1 # TSIM: endi # TSIM: @@ -778,8 +778,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 3 then - tdLog.info('tdSql.checkData(0, 4, 3)') - tdSql.checkData(0, 4, 3) + tdLog.info('tdSql.checkData(0, 4, "3")') + tdSql.checkData(0, 4, "3") # TSIM: return -1 # TSIM: endi # TSIM: @@ -835,8 +835,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 5 then - tdLog.info('tdSql.checkData(0, 3, 5)') - tdSql.checkData(0, 3, 5) + tdLog.info('tdSql.checkData(0, 3, "5")') + tdSql.checkData(0, 3, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 1 then @@ -897,13 +897,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 2 then - tdLog.info('tdSql.checkData(0, 3, 2)') - tdSql.checkData(0, 3, 2) + tdLog.info('tdSql.checkData(0, 3, "2")') + tdSql.checkData(0, 3, "2") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 3 then - tdLog.info('tdSql.checkData(0, 4, 3)') - tdSql.checkData(0, 4, 3) + tdLog.info('tdSql.checkData(0, 4, "3")') + tdSql.checkData(0, 4, "3") # TSIM: return -1 # TSIM: endi # TSIM: @@ -1021,29 +1021,29 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data02 != 1 then - tdLog.info('tdSql.checkData(0, 2, 1)') - tdSql.checkData(0, 2, 1) + tdLog.info('tdSql.checkData(0, 2, "1")') + tdSql.checkData(0, 2, "1") # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 2 then - tdLog.info('tdSql.checkData(0, 3, 2)') - tdSql.checkData(0, 3, 2) + tdLog.info('tdSql.checkData(0, 3, "2")') + tdSql.checkData(0, 3, "2") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 3 then - tdLog.info('tdSql.checkData(0, 4, 3)') - tdSql.checkData(0, 4, 3) + tdLog.info('tdSql.checkData(0, 4, "3")') + tdSql.checkData(0, 4, "3") # TSIM: return -1 # TSIM: endi # TSIM: if $data05 != 4 then - tdLog.info('tdSql.checkData(0, 5, 4)') - tdSql.checkData(0, 5, 4) + tdLog.info('tdSql.checkData(0, 5, "4")') + tdSql.checkData(0, 5, "4") # TSIM: return -1 # TSIM: endi # TSIM: # TSIM: sql alter table $mt change tag tgcol1 tgcol4 -x step103 tdLog.info('alter table %s change tag tgcol1 tgcol4 -x step103' % (mt)) - tdSql.error('alter table %s change tag tgcol1 tgcol403' % (mt)) + tdSql.error('alter table %s change tag tgcol1 tgcol4' % (mt)) # TSIM: return -1 # TSIM: step103: # TSIM: @@ -1095,13 +1095,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data02 != 1 then - tdLog.info('tdSql.checkData(0, 2, 1)') - tdSql.checkData(0, 2, 1) + tdLog.info('tdSql.checkData(0, 2, "1")') + tdSql.checkData(0, 2, "1") # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 4 then - tdLog.info('tdSql.checkData(0, 3, 4)') - tdSql.checkData(0, 3, 4) + tdLog.info('tdSql.checkData(0, 3, "4")') + tdSql.checkData(0, 3, "4") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 0 then @@ -1111,18 +1111,22 @@ class TDTestCase: # TSIM: endi # TSIM: if $data05 != NULL then tdLog.info('tdSql.checkData(0, 5, NULL)') - tdSql.checkData(0, 5, None) + try: + tdSql.checkData(0, 5, None) + except Exception as e: + tdLog.info(repr(e)) + tdLog.info("out of range") # TSIM: return -1 # TSIM: endi # TSIM: # TSIM: sql select * from $mt where tgcol2 = 1 -x step101 tdLog.info('select * from %s where tgcol2 = 1 -x step101' % (mt)) - tdSql.error('select * from %s where tgcol2 = 101' % (mt)) + tdSql.error('select * from %s where tgcol2 = 1' % (mt)) # TSIM: return -1 # TSIM: step101: # TSIM: sql select * from $mt where tgcol3 = 1 -x step102 tdLog.info('select * from %s where tgcol3 = 1 -x step102' % (mt)) - tdSql.error('select * from %s where tgcol3 = 102' % (mt)) + tdSql.error('select * from %s where tgcol3 = 1' % (mt)) # TSIM: return -1 # TSIM: step102: # TSIM: @@ -1186,14 +1190,14 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 5 then - tdLog.info('tdSql.checkData(0, 6, 5)') - tdSql.checkData(0, 6, 5) + tdLog.info('tdSql.checkData(0, 6, "5")') + tdSql.checkData(0, 6, "5") # TSIM: return -1 # TSIM: endi # TSIM: # TSIM: sql alter table $mt change tag tgcol1 tgcol4 -x step114 tdLog.info('alter table %s change tag tgcol1 tgcol4 -x step114' % (mt)) - tdSql.error('alter table %s change tag tgcol1 tgcol414' % (mt)) + tdSql.error('alter table %s change tag tgcol1 tgcol4' % (mt)) # TSIM: return -1 # TSIM: step114: # TSIM: @@ -1271,8 +1275,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 4 then - tdLog.info('tdSql.checkData(0, 3, 4)') - tdSql.checkData(0, 3, 4) + tdLog.info('tdSql.checkData(0, 3, "4")') + tdSql.checkData(0, 3, "4") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 5 then @@ -1281,8 +1285,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data05 != 6 then - tdLog.info('tdSql.checkData(0, 5, 6)') - tdSql.checkData(0, 5, 6) + tdLog.info('tdSql.checkData(0, 5, "6")') + tdSql.checkData(0, 5, "6") # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 7 then @@ -1298,17 +1302,17 @@ class TDTestCase: # TSIM: # TSIM: sql select * from $mt where tgcol2 = 1 -x step111 tdLog.info('select * from %s where tgcol2 = 1 -x step111' % (mt)) - tdSql.error('select * from %s where tgcol2 = 111' % (mt)) + tdSql.error('select * from %s where tgcol2 = 1' % (mt)) # TSIM: return -1 # TSIM: step111: # TSIM: sql select * from $mt where tgcol3 = 1 -x step112 tdLog.info('select * from %s where tgcol3 = 1 -x step112' % (mt)) - tdSql.error('select * from %s where tgcol3 = 112' % (mt)) + tdSql.error('select * from %s where tgcol3 = 1' % (mt)) # TSIM: return -1 # TSIM: step112: # TSIM: sql select * from $mt where tgcol9 = 1 -x step113 tdLog.info('select * from %s where tgcol9 = 1 -x step113' % (mt)) - tdSql.error('select * from %s where tgcol9 = 113' % (mt)) + tdSql.error('select * from %s where tgcol9 = 1' % (mt)) # TSIM: return -1 # TSIM: step113: # TSIM: @@ -1373,13 +1377,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 5 then - tdLog.info('tdSql.checkData(0, 6, 5)') - tdSql.checkData(0, 6, 5) + tdLog.info('tdSql.checkData(0, 6, "5")') + tdSql.checkData(0, 6, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data07 != 6 then - tdLog.info('tdSql.checkData(0, 7, 6)') - tdSql.checkData(0, 7, 6) + tdLog.info('tdSql.checkData(0, 7, "6")') + tdSql.checkData(0, 7, "6") # TSIM: return -1 # TSIM: endi # TSIM: @@ -1457,13 +1461,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 1 then - tdLog.info('tdSql.checkData(0, 3, 1)') - tdSql.checkData(0, 3, 1) + tdLog.info('tdSql.checkData(0, 3, "1")') + tdSql.checkData(0, 3, "1") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 5 then - tdLog.info('tdSql.checkData(0, 4, 5)') - tdSql.checkData(0, 4, 5) + tdLog.info('tdSql.checkData(0, 4, "5")') + tdSql.checkData(0, 4, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data05 != 4 then @@ -1472,8 +1476,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 3 then - tdLog.info('tdSql.checkData(0, 6, 3)') - tdSql.checkData(0, 6, 3) + tdLog.info('tdSql.checkData(0, 6, "3")') + tdSql.checkData(0, 6, "3") # TSIM: return -1 # TSIM: endi # TSIM: if $data07 != 2 then @@ -1559,8 +1563,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data02 != 1 then - tdLog.info('tdSql.checkData(0, 2, 1)') - tdSql.checkData(0, 2, 1) + tdLog.info('tdSql.checkData(0, 2, "1")') + tdSql.checkData(0, 2, "1") # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 2 then @@ -1574,8 +1578,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data05 != 4 then - tdLog.info('tdSql.checkData(0, 5, 4)') - tdSql.checkData(0, 5, 4) + tdLog.info('tdSql.checkData(0, 5, "4")') + tdSql.checkData(0, 5, "4") # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 5.000000000 then @@ -1584,8 +1588,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data07 != 6 then - tdLog.info('tdSql.checkData(0, 7, 6)') - tdSql.checkData(0, 7, 6) + tdLog.info('tdSql.checkData(0, 7, "6")') + tdSql.checkData(0, 7, "6") # TSIM: return -1 # TSIM: endi # TSIM: @@ -1652,8 +1656,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data02 != 7 then - tdLog.info('tdSql.checkData(0, 2, 7)') - tdSql.checkData(0, 2, 7) + tdLog.info('tdSql.checkData(0, 2, "7")') + tdSql.checkData(0, 2, "7") # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 9 then @@ -1667,8 +1671,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data05 != 8 then - tdLog.info('tdSql.checkData(0, 5, 8)') - tdSql.checkData(0, 5, 8) + tdLog.info('tdSql.checkData(0, 5, "8")') + tdSql.checkData(0, 5, "8") # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 10 then @@ -1867,13 +1871,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 5 then - tdLog.info('tdSql.checkData(0, 3, 5)') - tdSql.checkData(0, 3, 5) + tdLog.info('tdSql.checkData(0, 3, "5")') + tdSql.checkData(0, 3, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 6 then - tdLog.info('tdSql.checkData(0, 4, 6)') - tdSql.checkData(0, 4, 6) + tdLog.info('tdSql.checkData(0, 4, "6")') + tdSql.checkData(0, 4, "6") # TSIM: return -1 # TSIM: endi # TSIM: @@ -1898,13 +1902,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 5 then - tdLog.info('tdSql.checkData(0, 3, 5)') - tdSql.checkData(0, 3, 5) + tdLog.info(': tdSql.checkData(0, 3, "5")') + tdSql.checkData(0, 3, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 6 then - tdLog.info('tdSql.checkData(0, 4, 6)') - tdSql.checkData(0, 4, 6) + tdLog.info('tdSql.checkData(0, 4, "6")') + tdSql.checkData(0, 4, "6") # TSIM: return -1 # TSIM: endi # TSIM: @@ -1988,8 +1992,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 5 then - tdLog.info('tdSql.checkData(0, 3, 5)') - tdSql.checkData(0, 3, 5) + tdLog.info('tdSql.checkData(0, 3, "5")') + tdSql.checkData(0, 3, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 1 then @@ -2065,13 +2069,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data02 != 1 then - tdLog.info('tdSql.checkData(0, 2, 1)') - tdSql.checkData(0, 2, 1) + tdLog.info('tdSql.checkData(0, 2, "1")') + tdSql.checkData(0, 2, "1") # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 4 then - tdLog.info('tdSql.checkData(0, 3, 4)') - tdSql.checkData(0, 3, 4) + tdLog.info('tdSql.checkData(0, 3, "4")') + tdSql.checkData(0, 3, "4") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 0 then @@ -2081,7 +2085,11 @@ class TDTestCase: # TSIM: endi # TSIM: if $data05 != NULL then tdLog.info('tdSql.checkData(0, 5, NULL)') - tdSql.checkData(0, 5, None) + try: + tdSql.checkData(0, 5, None) + except Exception as e: + tdLog.info(repr(e)) + tdLog.info("out of range") # TSIM: return -1 # TSIM: endi # TSIM: @@ -2115,8 +2123,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 4 then - tdLog.info('tdSql.checkData(0, 3, 4)') - tdSql.checkData(0, 3, 4) + tdLog.info('tdSql.checkData(0, 3, "4")') + tdSql.checkData(0, 3, "4") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 5 then @@ -2125,8 +2133,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data05 != 6 then - tdLog.info('tdSql.checkData(0, 5, 6)') - tdSql.checkData(0, 5, 6) + tdLog.info('tdSql.checkData(0, 5, "6")') + tdSql.checkData(0, 5, "6") # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 7 then @@ -2171,13 +2179,13 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 1 then - tdLog.info('tdSql.checkData(0, 3, 1)') - tdSql.checkData(0, 3, 1) + tdLog.info('tdSql.checkData(0, 3, "1")') + tdSql.checkData(0, 3, "1") # TSIM: return -1 # TSIM: endi # TSIM: if $data04 != 5 then - tdLog.info('tdSql.checkData(0, 4, 5)') - tdSql.checkData(0, 4, 5) + tdLog.info('tdSql.checkData(0, 4, "5")') + tdSql.checkData(0, 4, "5") # TSIM: return -1 # TSIM: endi # TSIM: if $data05 != 4 then @@ -2186,8 +2194,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 3 then - tdLog.info('tdSql.checkData(0, 6, 3)') - tdSql.checkData(0, 6, 3) + tdLog.info('tdSql.checkData(0, 6, "3")') + tdSql.checkData(0, 6, "3") # TSIM: return -1 # TSIM: endi # TSIM: if $data07 != 2 then @@ -2257,8 +2265,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data02 != 7 then - tdLog.info('tdSql.checkData(0, 2, 7)') - tdSql.checkData(0, 2, 7) + tdLog.info('tdSql.checkData(0, 2, "7")') + tdSql.checkData(0, 2, "7") # TSIM: return -1 # TSIM: endi # TSIM: if $data03 != 9 then @@ -2272,8 +2280,8 @@ class TDTestCase: # TSIM: return -1 # TSIM: endi # TSIM: if $data05 != 8 then - tdLog.info('tdSql.checkData(0, 5, 8)') - tdSql.checkData(0, 5, 8) + tdLog.info('tdSql.checkData(0, 5, "8")') + tdSql.checkData(0, 5, "8") # TSIM: return -1 # TSIM: endi # TSIM: if $data06 != 10 then @@ -2290,8 +2298,8 @@ class TDTestCase: # TSIM: print =============== clear tdLog.info('=============== clear') # TSIM: sql drop database $db - tdLog.info('sql drop database $db') - tdSql.execute('sql drop database $db') + tdLog.info('drop database db') + tdSql.execute('drop database db') # TSIM: sql show databases tdLog.info('show databases') tdSql.query('show databases')