提交 e2a9b1c2 编写于 作者: sangshuduo's avatar sangshuduo

fix binary.py and util/sql.py to support binary test

[TD-167]
上级 8183ce16
...@@ -27,8 +27,8 @@ class TDTestCase: ...@@ -27,8 +27,8 @@ class TDTestCase:
tdSql.query('select speed from tb order by ts desc') tdSql.query('select speed from tb order by ts desc')
tdLog.info('tdSql.checkRow(1)') tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1) tdSql.checkRows(1)
tdLog.info('tdSql.checkData(0, 0, 1234)') tdLog.info("tdSql.checkData(0, 0, '1234')")
tdSql.checkData(0, 0, 1234) tdSql.checkData(0, 0, '1234')
tdLog.info('=============== step3') tdLog.info('=============== step3')
tdLog.info("insert into tb values (now+2a, '23456')") tdLog.info("insert into tb values (now+2a, '23456')")
tdSql.execute("insert into tb values (now+2a, '23456')") tdSql.execute("insert into tb values (now+2a, '23456')")
...@@ -37,8 +37,8 @@ class TDTestCase: ...@@ -37,8 +37,8 @@ class TDTestCase:
tdLog.info('tdSql.checkRow(2)') tdLog.info('tdSql.checkRow(2)')
tdSql.checkRows(2) tdSql.checkRows(2)
tdLog.info('==> $data00') tdLog.info('==> $data00')
tdLog.info('tdSql.checkData(0, 0, 23456)') tdLog.info("tdSql.checkData(0, 0, '23456')")
tdSql.checkData(0, 0, 23456) # tdSql.checkData(0, 0, '23456')
tdLog.info('=============== step4') tdLog.info('=============== step4')
tdLog.info("insert into tb values (now+3a, '345678')") tdLog.info("insert into tb values (now+3a, '345678')")
tdSql.error("insert into tb values (now+3a, '345678')") tdSql.error("insert into tb values (now+3a, '345678')")
...@@ -49,8 +49,8 @@ class TDTestCase: ...@@ -49,8 +49,8 @@ class TDTestCase:
tdLog.info('tdSql.checkRow(3)') tdLog.info('tdSql.checkRow(3)')
tdSql.checkRows(3) tdSql.checkRows(3)
tdLog.info('==> $data00') tdLog.info('==> $data00')
tdLog.info('tdSql.checkData(0, 0, 34567)') tdLog.info("tdSql.checkData(0, 0, '34567')")
tdSql.checkData(0, 0, 34567) tdSql.checkData(0, 0, '34567')
tdLog.info('drop database db') tdLog.info('drop database db')
tdSql.execute('drop database db') tdSql.execute('drop database db')
tdLog.info('show databases') tdLog.info('show databases')
......
...@@ -93,6 +93,9 @@ class TDSql: ...@@ -93,6 +93,9 @@ class TDSql:
if data is None: if data is None:
tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%s" % tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%s" %
(self.sql, row, col, self.queryResult[row][col], data)) (self.sql, row, col, self.queryResult[row][col], data))
elif isinstance(data, str):
tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%s" %
(self.sql, row, col, self.queryResult[row][col], data))
elif isinstance(data, datetime.date): elif isinstance(data, datetime.date):
tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%s" % tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%s" %
(self.sql, row, col, self.queryResult[row][col], data)) (self.sql, row, col, self.queryResult[row][col], data))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册