提交 f4bc8a2b 编写于 作者: S Shuduo Sang

fix tag_lite/change.py

[TD-596]
上级 ac794240
...@@ -84,18 +84,30 @@ class TDTestCase: ...@@ -84,18 +84,30 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
# TSIM: sql alter table $mt change tag tagcx tgcol3 -x step21 # TSIM: sql alter table $mt change tag tagcx tgcol3 -x step21
tdLog.info("alter table ta_ch_mt2 change tag tagcx tgcol3 -x step21")
tdSql.error("alter table ta_ch_mt2 change tag tagcx tgcol3")
# TSIM: return -1 # TSIM: return -1
# TSIM: step21: # TSIM: step21:
# TSIM: sql alter table $mt change tag tgcol1 tgcol2 -x step22 # TSIM: sql alter table $mt change tag tgcol1 tgcol2 -x step22
tdLog.info("alter table ta_ch_mt2 change tag tgcol1 tgcol2 -x step22")
tdSql.error("alter table ta_ch_mt2 change tag tgcol1 tgcol2")
# TSIM: return -1 # TSIM: return -1
# TSIM: step22: # TSIM: step22:
# TSIM: sql alter table $mt change tag tgcol1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -x step20 # TSIM: sql alter table $mt change tag tgcol1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -x step20
tdLog.info("alter table ta_ch_mt2 change tag tgcol1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -x step20")
tdSql.error("alter table ta_ch_mt2 change tag tgcol1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -x step20")
# TSIM: return -1 # TSIM: return -1
# TSIM: step20: # TSIM: step20:
# TSIM: # TSIM:
# TSIM: sql alter table $mt change tag tgcol1 tgcol3 # TSIM: sql alter table $mt change tag tgcol1 tgcol3
tdLog.info("alter table ta_ch_mt2 change tag tgcol1 tgcol3")
tdSql.execute("alter table ta_ch_mt2 change tag tgcol1 tgcol3")
# TSIM: sql alter table $mt change tag tgcol2 tgcol4 # TSIM: sql alter table $mt change tag tgcol2 tgcol4
tdLog.info("alter table ta_ch_mt2 change tag tgcol2 tgcol4")
tdSql.execute("alter table ta_ch_mt2 change tag tgcol2 tgcol4")
# TSIM: sql alter table $mt change tag tgcol4 tgcol3 -x step23 # TSIM: sql alter table $mt change tag tgcol4 tgcol3 -x step23
tdLog.info("alter table ta_ch_mt2 change tag tgcol4 tgcol3 -x step23")
tdSql.error("alter table ta_ch_mt2 change tag tgcol4 tgcol3")
# TSIM: return -1 # TSIM: return -1
# TSIM: step23: # TSIM: step23:
# TSIM: # TSIM:
...@@ -141,7 +153,11 @@ class TDTestCase: ...@@ -141,7 +153,11 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
# TSIM: sql alter table $mt change tag tgcol1 tgcol3 # TSIM: sql alter table $mt change tag tgcol1 tgcol3
tdLog.info("alter table ta_ch_mt3 change tag tgcol1 tgcol3")
tdSql.execute("alter table ta_ch_mt3 change tag tgcol1 tgcol3")
# TSIM: sql alter table $mt change tag tgcol2 tgcol4 # TSIM: sql alter table $mt change tag tgcol2 tgcol4
tdLog.info("alter table ta_ch_mt3 change tag tgcol2 tgcol4")
tdSql.execute("alter table ta_ch_mt3 change tag tgcol2 tgcol4")
# TSIM: # TSIM:
# TSIM: print =============== step4 # TSIM: print =============== step4
tdLog.info('=============== step4') tdLog.info('=============== step4')
...@@ -185,7 +201,11 @@ class TDTestCase: ...@@ -185,7 +201,11 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
# TSIM: sql alter table $mt change tag tgcol1 tgcol3 # TSIM: sql alter table $mt change tag tgcol1 tgcol3
tdLog.info("alter table ta_ch_mt4 change tag tgcol1 tgcol3")
tdSql.execute("alter table ta_ch_mt4 change tag tgcol1 tgcol3")
# TSIM: sql alter table $mt change tag tgcol2 tgcol4 # TSIM: sql alter table $mt change tag tgcol2 tgcol4
tdLog.info("alter table ta_ch_mt4 change tag tgcol2 tgcol4")
tdSql.execute("alter table ta_ch_mt4 change tag tgcol2 tgcol4")
# TSIM: # TSIM:
# TSIM: print =============== step5 # TSIM: print =============== step5
tdLog.info('=============== step5') tdLog.info('=============== step5')
...@@ -224,12 +244,16 @@ class TDTestCase: ...@@ -224,12 +244,16 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
tdLog.info('tdSql.checkData(0, 3, 2)') tdLog.info('tdSql.checkData(0, 3, 2)')
tdSql.checkData(0, 3, 2) tdSql.checkData(0, 3, "2")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
# TSIM: sql alter table $mt change tag tgcol1 tgcol3 # TSIM: sql alter table $mt change tag tgcol1 tgcol3
tdLog.info("alter table ta_ch_mt5 change tag tgcol1 tgcol3")
tdSql.execute("alter table ta_ch_mt5 change tag tgcol1 tgcol3")
# TSIM: sql alter table $mt change tag tgcol2 tgcol4 # TSIM: sql alter table $mt change tag tgcol2 tgcol4
tdLog.info("alter table ta_ch_mt5 change tag tgcol2 tgcol4")
tdSql.execute("alter table ta_ch_mt5 change tag tgcol2 tgcol4")
# TSIM: # TSIM:
# TSIM: print =============== step6 # TSIM: print =============== step6
tdLog.info('=============== step6') tdLog.info('=============== step6')
...@@ -257,13 +281,13 @@ class TDTestCase: ...@@ -257,13 +281,13 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data01 != 1 then # TSIM: if $data01 != 1 then
tdLog.info('tdSql.checkData(0, 1, 1)') tdLog.info("tdSql.checkData(0, 1, 1)")
tdSql.checkData(0, 1, 1) tdSql.checkData(0, 1, 1)
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data02 != 1 then # TSIM: if $data02 != 1 then
tdLog.info('tdSql.checkData(0, 2, 1)') tdLog.info('tdSql.checkData(0, 2, "1")')
tdSql.checkData(0, 2, 1) tdSql.checkData(0, 2, "1")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
...@@ -278,7 +302,7 @@ class TDTestCase: ...@@ -278,7 +302,7 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: if $data05 != 4 then # TSIM: if $data05 != 4 then
tdLog.info('tdSql.checkData(0, 5, 4)') tdLog.info('tdSql.checkData(0, 5, 4)')
tdSql.checkData(0, 5, 4) tdSql.checkData(0, 5, '4')
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data06 != 5.000000000 then # TSIM: if $data06 != 5.000000000 then
...@@ -288,22 +312,42 @@ class TDTestCase: ...@@ -288,22 +312,42 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: if $data07 != 6 then # TSIM: if $data07 != 6 then
tdLog.info('tdSql.checkData(0, 7, 6)') tdLog.info('tdSql.checkData(0, 7, 6)')
tdSql.checkData(0, 7, 6) tdSql.checkData(0, 7, '6')
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
# TSIM: sql alter table $mt drop tag tgcol3 # TSIM: sql alter table $mt drop tag tgcol3
tdLog.info("alter table ta_ch_mt6 drop tag tgcol3")
tdSql.execute("alter table ta_ch_mt6 drop tag tgcol3")
# TSIM: sql reset query cache # TSIM: sql reset query cache
tdLog.info("reset query cache")
tdSql.execute("reset query cache")
# TSIM: sql alter table $mt change tag tgcol4 tgcol3 # TSIM: sql alter table $mt change tag tgcol4 tgcol3
tdLog.info("alter table ta_ch_mt6 change tag tgcol4 tgcol3")
tdSql.execute("alter table ta_ch_mt6 change tag tgcol4 tgcol3")
# TSIM: sql alter table $mt change tag tgcol1 tgcol7 # TSIM: sql alter table $mt change tag tgcol1 tgcol7
tdLog.info("alter table ta_ch_mt6 change tag tgcol1 tgcol7")
tdSql.execute("alter table ta_ch_mt6 change tag tgcol1 tgcol7")
# TSIM: sql alter table $mt change tag tgcol2 tgcol8 # TSIM: sql alter table $mt change tag tgcol2 tgcol8
tdLog.info("alter table ta_ch_mt6 change tag tgcol2 tgcol8")
tdSql.execute("alter table ta_ch_mt6 change tag tgcol2 tgcol8")
# TSIM: sql reset query cache # TSIM: sql reset query cache
tdLog.info("reset query cache")
tdSql.execute("reset query cache")
# TSIM: sql alter table $mt change tag tgcol3 tgcol9 # TSIM: sql alter table $mt change tag tgcol3 tgcol9
tdLog.info("alter table ta_ch_mt6 change tag tgcol3 tgcol9")
tdSql.execute("alter table ta_ch_mt6 change tag tgcol3 tgcol9")
# TSIM: sql alter table $mt change tag tgcol5 tgcol10 # TSIM: sql alter table $mt change tag tgcol5 tgcol10
tdLog.info("alter table ta_ch_mt6 change tag tgcol5 tgcol10")
tdSql.execute("alter table ta_ch_mt6 change tag tgcol5 tgcol10")
# TSIM: sql alter table $mt change tag tgcol6 tgcol11 # TSIM: sql alter table $mt change tag tgcol6 tgcol11
tdLog.info("alter table ta_ch_mt6 change tag tgcol6 tgcol11")
tdSql.execute("alter table ta_ch_mt6 change tag tgcol6 tgcol11")
# TSIM: # TSIM:
# TSIM: sleep 5000 # TSIM: sleep 5000
# TSIM: sql reset query cache # TSIM: sql reset query cache
tdLog.info("reset query cache")
tdSql.execute("reset query cache")
# TSIM: # TSIM:
# TSIM: print =============== step2 # TSIM: print =============== step2
tdLog.info('=============== step2') tdLog.info('=============== step2')
...@@ -313,12 +357,12 @@ class TDTestCase: ...@@ -313,12 +357,12 @@ class TDTestCase:
# TSIM: # TSIM:
# TSIM: sql select * from $mt where tgcol1 = 1 -x step24 # TSIM: sql select * from $mt where tgcol1 = 1 -x step24
tdLog.info('select * from ta_ch_mt2 where tgcol1 = 1 -x step24') tdLog.info('select * from ta_ch_mt2 where tgcol1 = 1 -x step24')
tdSql.error('select * from ta_ch_mt2 where tgcol1 = 14') tdSql.error("select * from ta_ch_mt2 where tgcol1 = 1")
# TSIM: return -1 # TSIM: return -1
# TSIM: step24: # TSIM: step24:
# TSIM: sql select * from $mt where tgcol2 = 1 -x step25 # TSIM: sql select * from $mt where tgcol2 = 1 -x step25
tdLog.info('select * from ta_ch_mt2 where tgcol2 = 1 -x step25') tdLog.info('select * from ta_ch_mt2 where tgcol2 = 1 -x step25')
tdSql.error('select * from ta_ch_mt2 where tgcol2 = 15') tdSql.error('select * from ta_ch_mt2 where tgcol2 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step25: # TSIM: step25:
# TSIM: # TSIM:
...@@ -382,12 +426,12 @@ class TDTestCase: ...@@ -382,12 +426,12 @@ class TDTestCase:
# TSIM: # TSIM:
# TSIM: sql select * from $mt where tgcol1 = 1 -x step31 # TSIM: sql select * from $mt where tgcol1 = 1 -x step31
tdLog.info('select * from ta_ch_mt3 where tgcol1 = 1 -x step31') tdLog.info('select * from ta_ch_mt3 where tgcol1 = 1 -x step31')
tdSql.error('select * from ta_ch_mt3 where tgcol1 = 11') tdSql.error('select * from ta_ch_mt3 where tgcol1 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step31: # TSIM: step31:
# TSIM: sql select * from $mt where tgcol2 = 1 -x step32 # TSIM: sql select * from $mt where tgcol2 = 1 -x step32
tdLog.info('select * from ta_ch_mt3 where tgcol2 = 1 -x step32') tdLog.info('select * from ta_ch_mt3 where tgcol2 = 1 -x step32')
tdSql.error('select * from ta_ch_mt3 where tgcol2 = 12') tdSql.error('select * from ta_ch_mt3 where tgcol2 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step32: # TSIM: step32:
# TSIM: # TSIM:
...@@ -418,8 +462,8 @@ class TDTestCase: ...@@ -418,8 +462,8 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
# TSIM: sql select * from $mt where tgcol4 = 2 # TSIM: sql select * from $mt where tgcol4 = 2
tdLog.info('select * from $mt where tgcol4 = 2') tdLog.info('select * from ta_ch_mt3 where tgcol4 = 2')
tdSql.query('select * from $mt where tgcol4 = 2') tdSql.query('select * from ta_ch_mt3 where tgcol4 = 2')
# TSIM: print $data01 $data02 $data03 # TSIM: print $data01 $data02 $data03
tdLog.info('$data01 $data02 $data03') tdLog.info('$data01 $data02 $data03')
# TSIM: if $rows != 1 then # TSIM: if $rows != 1 then
...@@ -551,7 +595,7 @@ class TDTestCase: ...@@ -551,7 +595,7 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
tdLog.info('tdSql.checkData(0, 3, 2)') tdLog.info('tdSql.checkData(0, 3, 2)')
tdSql.checkData(0, 3, 2) tdSql.checkData(0, 3, "2")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
...@@ -577,7 +621,7 @@ class TDTestCase: ...@@ -577,7 +621,7 @@ class TDTestCase:
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
tdLog.info('tdSql.checkData(0, 3, 2)') tdLog.info('tdSql.checkData(0, 3, 2)')
tdSql.checkData(0, 3, 2) tdSql.checkData(0, 3, "2")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
...@@ -589,32 +633,32 @@ class TDTestCase: ...@@ -589,32 +633,32 @@ class TDTestCase:
# TSIM: # TSIM:
# TSIM: sql select * from $mt where tgcol1 = 1 -x step61 # TSIM: sql select * from $mt where tgcol1 = 1 -x step61
tdLog.info('select * from ta_ch_mt6 where tgcol1 = 1 -x step61') tdLog.info('select * from ta_ch_mt6 where tgcol1 = 1 -x step61')
tdSql.error('select * from ta_ch_mt6 where tgcol1 = 11') tdSql.error('select * from ta_ch_mt6 where tgcol1 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step61: # TSIM: step61:
# TSIM: sql select * from $mt where tgcol2 = 1 -x step62 # TSIM: sql select * from $mt where tgcol2 = 1 -x step62
tdLog.info('select * from ta_ch_mt6 where tgcol2 = 1 -x step62') tdLog.info('select * from ta_ch_mt6 where tgcol2 = 1 -x step62')
tdSql.error('select * from ta_ch_mt6 where tgcol2 = 12') tdSql.error('select * from ta_ch_mt6 where tgcol2 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step62: # TSIM: step62:
# TSIM: sql select * from $mt where tgcol3 = 1 -x step63 # TSIM: sql select * from $mt where tgcol3 = 1 -x step63
tdLog.info('select * from ta_ch_mt6 where tgcol3 = 1 -x step63') tdLog.info('select * from ta_ch_mt6 where tgcol3 = 1 -x step63')
tdSql.error('select * from ta_ch_mt6 where tgcol3 = 13') tdSql.error('select * from ta_ch_mt6 where tgcol3 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step63: # TSIM: step63:
# TSIM: sql select * from $mt where tgcol4 = 1 -x step64 # TSIM: sql select * from $mt where tgcol4 = 1 -x step64
tdLog.info('select * from ta_ch_mt6 where tgcol4 = 1 -x step64') tdLog.info('select * from ta_ch_mt6 where tgcol4 = 1 -x step64')
tdSql.error('select * from ta_ch_mt6 where tgcol4 = 14') tdSql.error('select * from ta_ch_mt6 where tgcol4 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step64: # TSIM: step64:
# TSIM: sql select * from $mt where tgcol5 = 1 -x step65 # TSIM: sql select * from $mt where tgcol5 = 1 -x step65
tdLog.info('select * from ta_ch_mt6 where tgcol5 = 1 -x step65') tdLog.info('select * from ta_ch_mt6 where tgcol5 = 1 -x step65')
tdSql.error('select * from ta_ch_mt6 where tgcol5 = 15') tdSql.error('select * from ta_ch_mt6 where tgcol5 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step65: # TSIM: step65:
# TSIM: sql select * from $mt where tgcol6 = 1 -x step66 # TSIM: sql select * from $mt where tgcol6 = 1 -x step66
tdLog.info('select * from ta_ch_mt6 where tgcol6 = 1 -x step66') tdLog.info('select * from ta_ch_mt6 where tgcol6 = 1 -x step66')
tdSql.error('select * from ta_ch_mt6 where tgcol6 = 16') tdSql.error('select * from ta_ch_mt6 where tgcol6 = 1')
# TSIM: return -1 # TSIM: return -1
# TSIM: step66: # TSIM: step66:
# TSIM: # TSIM:
...@@ -634,8 +678,8 @@ class TDTestCase: ...@@ -634,8 +678,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data02 != 1 then # TSIM: if $data02 != 1 then
tdLog.info('tdSql.checkData(0, 2, 1)') tdLog.info('tdSql.checkData(0, 2, "1")')
tdSql.checkData(0, 2, 1) tdSql.checkData(0, 2, "1")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
...@@ -644,8 +688,8 @@ class TDTestCase: ...@@ -644,8 +688,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data04 != 4 then # TSIM: if $data04 != 4 then
tdLog.info('tdSql.checkData(0, 4, 4)') tdLog.info('tdSql.checkData(0, 4, "4")')
tdSql.checkData(0, 4, 4) tdSql.checkData(0, 4, "4")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data05 != 5.000000000 then # TSIM: if $data05 != 5.000000000 then
...@@ -654,13 +698,18 @@ class TDTestCase: ...@@ -654,13 +698,18 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data06 != 6 then # TSIM: if $data06 != 6 then
tdLog.info('tdSql.checkData(0, 6, 6)') tdLog.info('tdSql.checkData(0, 6, "6")')
tdSql.checkData(0, 6, 6) tdSql.checkData(0, 6, "6")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data07 != NULL then # TSIM: if $data07 != NULL then
tdLog.info('tdSql.checkData(0, 7, NULL)') tdLog.info('tdSql.checkData(0, 7, NULL)')
tdSql.checkData(0, 7, None)
try:
tdSql.checkData(0, 7, None)
except Exception as e:
tdLog.info(repr(e))
tdLog.info("out of range")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
...@@ -680,8 +729,8 @@ class TDTestCase: ...@@ -680,8 +729,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data02 != 1 then # TSIM: if $data02 != 1 then
tdLog.info('tdSql.checkData(0, 2, 1)') tdLog.info('tdSql.checkData(0, 2, "1")')
tdSql.checkData(0, 2, 1) tdSql.checkData(0, 2, "1")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
...@@ -690,8 +739,8 @@ class TDTestCase: ...@@ -690,8 +739,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data04 != 4 then # TSIM: if $data04 != 4 then
tdLog.info('tdSql.checkData(0, 4, 4)') tdLog.info('tdSql.checkData(0, 4, "4"")')
tdSql.checkData(0, 4, 4) tdSql.checkData(0, 4, "4")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data05 != 5.000000000 then # TSIM: if $data05 != 5.000000000 then
...@@ -700,13 +749,17 @@ class TDTestCase: ...@@ -700,13 +749,17 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data06 != 6 then # TSIM: if $data06 != 6 then
tdLog.info('tdSql.checkData(0, 6, 6)') tdLog.info('tdSql.checkData(0, 6, "6")')
tdSql.checkData(0, 6, 6) tdSql.checkData(0, 6, "6")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data07 != NULL then # TSIM: if $data07 != NULL then
tdLog.info('tdSql.checkData(0, 7, NULL)') tdLog.info('tdSql.checkData(0, 7, NULL)')
tdSql.checkData(0, 7, None) try:
tdSql.checkData(0, 7, None)
except Exception as e:
tdLog.info(repr(e))
tdLog.info("out of range")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
...@@ -726,8 +779,8 @@ class TDTestCase: ...@@ -726,8 +779,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data02 != 1 then # TSIM: if $data02 != 1 then
tdLog.info('tdSql.checkData(0, 2, 1)') tdLog.info('tdSql.checkData(0, 2, "1")')
tdSql.checkData(0, 2, 1) tdSql.checkData(0, 2, "1")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
...@@ -736,8 +789,8 @@ class TDTestCase: ...@@ -736,8 +789,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data04 != 4 then # TSIM: if $data04 != 4 then
tdLog.info('tdSql.checkData(0, 4, 4)') tdLog.info('tdSql.checkData(0, 4, "4")')
tdSql.checkData(0, 4, 4) tdSql.checkData(0, 4, "4")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data05 != 5.000000000 then # TSIM: if $data05 != 5.000000000 then
...@@ -746,13 +799,17 @@ class TDTestCase: ...@@ -746,13 +799,17 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data06 != 6 then # TSIM: if $data06 != 6 then
tdLog.info('tdSql.checkData(0, 6, 6)') tdLog.info('tdSql.checkData(0, 6, "6")')
tdSql.checkData(0, 6, 6) tdSql.checkData(0, 6, "6")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data07 != NULL then # TSIM: if $data07 != NULL then
tdLog.info('tdSql.checkData(0, 7, NULL)') tdLog.info('tdSql.checkData(0, 7, NULL)')
tdSql.checkData(0, 7, None) try:
tdSql.checkData(0, 7, None)
except Exception as e:
tdLog.info(repr(e))
tdLog.info("out of range")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
...@@ -772,8 +829,8 @@ class TDTestCase: ...@@ -772,8 +829,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data02 != 1 then # TSIM: if $data02 != 1 then
tdLog.info('tdSql.checkData(0, 2, 1)') tdLog.info('tdSql.checkData(0, 2, "1")')
tdSql.checkData(0, 2, 1) tdSql.checkData(0, 2, "1")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
...@@ -782,8 +839,8 @@ class TDTestCase: ...@@ -782,8 +839,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data04 != 4 then # TSIM: if $data04 != 4 then
tdLog.info('tdSql.checkData(0, 4, 4)') tdLog.info('tdSql.checkData(0, 4, "4")')
tdSql.checkData(0, 4, 4) tdSql.checkData(0, 4, "4")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data05 != 5.000000000 then # TSIM: if $data05 != 5.000000000 then
...@@ -792,13 +849,17 @@ class TDTestCase: ...@@ -792,13 +849,17 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data06 != 6 then # TSIM: if $data06 != 6 then
tdLog.info('tdSql.checkData(0, 6, 6)') tdLog.info('tdSql.checkData(0, 6, "6")')
tdSql.checkData(0, 6, 6) tdSql.checkData(0, 6, "6")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data07 != NULL then # TSIM: if $data07 != NULL then
tdLog.info('tdSql.checkData(0, 7, NULL)') tdLog.info('tdSql.checkData(0, 7, NULL)')
tdSql.checkData(0, 7, None) try:
tdSql.checkData(0, 7, None)
except Exception as e:
tdLog.info(repr(e))
tdLog.info("out of range")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
...@@ -818,8 +879,8 @@ class TDTestCase: ...@@ -818,8 +879,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data02 != 1 then # TSIM: if $data02 != 1 then
tdLog.info('tdSql.checkData(0, 2, 1)') tdLog.info('tdSql.checkData(0, 2, "1")')
tdSql.checkData(0, 2, 1) tdSql.checkData(0, 2, "1")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data03 != 2 then # TSIM: if $data03 != 2 then
...@@ -828,8 +889,8 @@ class TDTestCase: ...@@ -828,8 +889,8 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data04 != 4 then # TSIM: if $data04 != 4 then
tdLog.info('tdSql.checkData(0, 4, 4)') tdLog.info('tdSql.checkData(0, 4, "4")')
tdSql.checkData(0, 4, 4) tdSql.checkData(0, 4, "4")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data05 != 5.000000000 then # TSIM: if $data05 != 5.000000000 then
...@@ -838,13 +899,17 @@ class TDTestCase: ...@@ -838,13 +899,17 @@ class TDTestCase:
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data06 != 6 then # TSIM: if $data06 != 6 then
tdLog.info('tdSql.checkData(0, 6, 6)') tdLog.info('tdSql.checkData(0, 6, "6")')
tdSql.checkData(0, 6, 6) tdSql.checkData(0, 6, "6")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: if $data07 != NULL then # TSIM: if $data07 != NULL then
tdLog.info('tdSql.checkData(0, 7, NULL)') tdLog.info('tdSql.checkData(0, 7, NULL)')
tdSql.checkData(0, 7, None) try:
tdSql.checkData(0, 7, None)
except Exception as e:
tdLog.info(repr(e))
tdLog.info("out of range")
# TSIM: return -1 # TSIM: return -1
# TSIM: endi # TSIM: endi
# TSIM: # TSIM:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册