From 238879bc80e7a934a267c41e4656eb794fc65aa9 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Sun, 26 Apr 2020 15:34:15 +0800 Subject: [PATCH] add None type support in sql.py. --- tests/pytest/simpletest.sh | 22 +++++++++++++++++++--- tests/pytest/util/sql.py | 7 ++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/tests/pytest/simpletest.sh b/tests/pytest/simpletest.sh index 58345e13ee..73b25d2056 100755 --- a/tests/pytest/simpletest.sh +++ b/tests/pytest/simpletest.sh @@ -1,9 +1,25 @@ #!/bin/bash -python3 ./test.py -f insert/basic.py $1 +python3 ./test.py $1 -f insert/basic.py python3 ./test.py -s $1 sleep 1 -python3 ./test.py -f insert/int.py $1 +python3 ./test.py $1 -f insert/int.py python3 ./test.py -s $1 sleep 1 -python3 ./test.py -f insert/float.py $1 +python3 ./test.py $1 -f insert/float.py python3 ./test.py -s $1 +sleep 1 +python3 ./test.py $1 -f insert/bigint.py +python3 ./test.py -s $1 +sleep 1 +python3 ./test.py $1 -f insert/bool.py +python3 ./test.py -s $1 +sleep 1 +python3 ./test.py $1 -f insert/double.py +python3 ./test.py -s $1 +sleep 1 +python3 ./test.py $1 -f insert/smallint.py +python3 ./test.py -s $1 +sleep 1 +python3 ./test.py $1 -f insert/tinyint.py +python3 ./test.py -s $1 +sleep 1 diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index 0008468130..edfee4ddb1 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -89,7 +89,12 @@ class TDSql: tdLog.exit( "sql:%.40s row:%d col:%d data:%s != expect:%s" % (self.sql, row, col, self.queryResult[row][col], data)) - tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%d" % + + 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)) + else: + tdLog.info("sql:%.40s, row:%d col:%d data:%s == expect:%d" % (self.sql, row, col, self.queryResult[row][col], data)) def getData(self, row, col): -- GitLab