未验证 提交 9e8a46e4 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1804 from taosdata/add-insert-testcase-to-2.0

fix binary.py and util/sql.py to support binary test
......@@ -27,8 +27,8 @@ class TDTestCase:
tdSql.query('select speed from tb order by ts desc')
tdLog.info('tdSql.checkRow(1)')
tdSql.checkRows(1)
tdLog.info('tdSql.checkData(0, 0, 1234)')
tdSql.checkData(0, 0, 1234)
tdLog.info("tdSql.checkData(0, 0, '1234')")
tdSql.checkData(0, 0, '1234')
tdLog.info('=============== step3')
tdLog.info("insert into tb values (now+2a, '23456')")
tdSql.execute("insert into tb values (now+2a, '23456')")
......@@ -37,8 +37,8 @@ class TDTestCase:
tdLog.info('tdSql.checkRow(2)')
tdSql.checkRows(2)
tdLog.info('==> $data00')
tdLog.info('tdSql.checkData(0, 0, 23456)')
tdSql.checkData(0, 0, 23456)
tdLog.info("tdSql.checkData(0, 0, '23456')")
tdSql.checkData(0, 0, '23456')
tdLog.info('=============== step4')
tdLog.info("insert into tb values (now+3a, '345678')")
tdSql.error("insert into tb values (now+3a, '345678')")
......@@ -49,8 +49,8 @@ class TDTestCase:
tdLog.info('tdSql.checkRow(3)')
tdSql.checkRows(3)
tdLog.info('==> $data00')
tdLog.info('tdSql.checkData(0, 0, 34567)')
tdSql.checkData(0, 0, 34567)
tdLog.info("tdSql.checkData(0, 0, '34567')")
tdSql.checkData(0, 0, '34567')
tdLog.info('drop database db')
tdSql.execute('drop database db')
tdLog.info('show databases')
......
......@@ -93,6 +93,9 @@ class TDSql:
if data is None:
tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%s" %
(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):
tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%s" %
(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.
先完成此消息的编辑!
想要评论请 注册