提交 c9e6bd4a 编写于 作者: J jiacy-jcy

update testcase

上级 971c1371
......@@ -95,7 +95,123 @@ class TDTestCase:
# tdSql.checkData(9,0,"2018-09-17 09:00:00.009000000")
tdSql.query("select timetruncate(1,1d) from stb")
tdSql.checkRows(10)
tdSql.query("select timetruncate(1,1u) from stb")
tdSql.checkRows(10)
tdSql.query("select timetruncate(1,1a) from stb")
tdSql.checkRows(10)
tdSql.query("select timetruncate(1,1m) from stb")
tdSql.checkRows(10)
tdSql.query("select timetruncate(1,1h) from stb")
tdSql.checkRows(10)
tdSql.query("select timetruncate(ts,1d) from stb")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 08:00:00.000")
tdSql.query("select timetruncate(ts,1h) from stb")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 09:00:00.000")
tdSql.query("select timetruncate(ts,1m) from stb")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 09:00:00.000")
tdSql.query("select timetruncate(ts,1s) from stb")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 09:00:00.000")
tdSql.query("select timetruncate(ts,1a) from stb")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 09:00:00.000")
tdSql.checkData(1,0,"2018-09-17 09:00:00.001")
tdSql.checkData(2,0,"2018-09-17 09:00:00.002")
tdSql.checkData(3,0,"2018-09-17 09:00:00.003")
tdSql.checkData(4,0,"2018-09-17 09:00:00.004")
tdSql.checkData(5,0,"2018-09-17 09:00:00.005")
tdSql.checkData(6,0,"2018-09-17 09:00:00.006")
tdSql.checkData(7,0,"2018-09-17 09:00:00.007")
tdSql.checkData(8,0,"2018-09-17 09:00:00.008")
tdSql.checkData(9,0,"2018-09-17 09:00:00.009")
# tdSql.query("select timetruncate(ts,1u) from stb")
# tdSql.checkRows(10)
# tdSql.checkData(0,0,"2018-09-17 09:00:00.000000")
# tdSql.checkData(1,0,"2018-09-17 09:00:00.001000")
# tdSql.checkData(2,0,"2018-09-17 09:00:00.002000")
# tdSql.checkData(3,0,"2018-09-17 09:00:00.003000")
# tdSql.checkData(4,0,"2018-09-17 09:00:00.004000")
# tdSql.checkData(5,0,"2018-09-17 09:00:00.005000")
# tdSql.checkData(6,0,"2018-09-17 09:00:00.006000")
# tdSql.checkData(7,0,"2018-09-17 09:00:00.007000")
# tdSql.checkData(8,0,"2018-09-17 09:00:00.008000")
# tdSql.checkData(9,0,"2018-09-17 09:00:00.009000")
# tdSql.query("select timetruncate(ts,1b) from stb")
# tdSql.checkRows(10)
# tdSql.checkData(0,0,"2018-09-17 09:00:00.000000000")
# tdSql.checkData(1,0,"2018-09-17 09:00:00.001000000")
# tdSql.checkData(2,0,"2018-09-17 09:00:00.002000000")
# tdSql.checkData(3,0,"2018-09-17 09:00:00.003000000")
# tdSql.checkData(4,0,"2018-09-17 09:00:00.004000000")
# tdSql.checkData(5,0,"2018-09-17 09:00:00.005000000")
# tdSql.checkData(6,0,"2018-09-17 09:00:00.006000000")
# tdSql.checkData(7,0,"2018-09-17 09:00:00.007000000")
# tdSql.checkData(8,0,"2018-09-17 09:00:00.008000000")
# tdSql.checkData(9,0,"2018-09-17 09:00:00.009000000")
tdSql.query("select timetruncate(1,1d) from stb_1")
tdSql.checkRows(10)
tdSql.query("select timetruncate(1,1u) from stb_1")
tdSql.checkRows(10)
tdSql.query("select timetruncate(1,1a) from stb_1")
tdSql.checkRows(10)
tdSql.query("select timetruncate(1,1m) from stb_1")
tdSql.checkRows(10)
tdSql.query("select timetruncate(1,1h) from stb_1")
tdSql.checkRows(10)
tdSql.query("select timetruncate(ts,1d) from stb_1")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 08:00:00.000")
tdSql.query("select timetruncate(ts,1h) from stb_1")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 09:00:00.000")
tdSql.query("select timetruncate(ts,1m) from stb_1")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 09:00:00.000")
tdSql.query("select timetruncate(ts,1s) from stb_1")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 09:00:00.000")
tdSql.query("select timetruncate(ts,1a) from stb_1")
tdSql.checkRows(10)
tdSql.checkData(0,0,"2018-09-17 09:00:00.000")
tdSql.checkData(1,0,"2018-09-17 09:00:00.001")
tdSql.checkData(2,0,"2018-09-17 09:00:00.002")
tdSql.checkData(3,0,"2018-09-17 09:00:00.003")
tdSql.checkData(4,0,"2018-09-17 09:00:00.004")
tdSql.checkData(5,0,"2018-09-17 09:00:00.005")
tdSql.checkData(6,0,"2018-09-17 09:00:00.006")
tdSql.checkData(7,0,"2018-09-17 09:00:00.007")
tdSql.checkData(8,0,"2018-09-17 09:00:00.008")
tdSql.checkData(9,0,"2018-09-17 09:00:00.009")
# tdSql.query("select timetruncate(ts,1u) from stb_1")
# tdSql.checkRows(10)
# tdSql.checkData(0,0,"2018-09-17 09:00:00.000000")
# tdSql.checkData(1,0,"2018-09-17 09:00:00.001000")
# tdSql.checkData(2,0,"2018-09-17 09:00:00.002000")
# tdSql.checkData(3,0,"2018-09-17 09:00:00.003000")
# tdSql.checkData(4,0,"2018-09-17 09:00:00.004000")
# tdSql.checkData(5,0,"2018-09-17 09:00:00.005000")
# tdSql.checkData(6,0,"2018-09-17 09:00:00.006000")
# tdSql.checkData(7,0,"2018-09-17 09:00:00.007000")
# tdSql.checkData(8,0,"2018-09-17 09:00:00.008000")
# tdSql.checkData(9,0,"2018-09-17 09:00:00.009000")
# tdSql.query("select timetruncate(ts,1b) from stb_1")
# tdSql.checkRows(10)
# tdSql.checkData(0,0,"2018-09-17 09:00:00.000000000")
# tdSql.checkData(1,0,"2018-09-17 09:00:00.001000000")
# tdSql.checkData(2,0,"2018-09-17 09:00:00.002000000")
# tdSql.checkData(3,0,"2018-09-17 09:00:00.003000000")
# tdSql.checkData(4,0,"2018-09-17 09:00:00.004000000")
# tdSql.checkData(5,0,"2018-09-17 09:00:00.005000000")
# tdSql.checkData(6,0,"2018-09-17 09:00:00.006000000")
# tdSql.checkData(7,0,"2018-09-17 09:00:00.007000000")
# tdSql.checkData(8,0,"2018-09-17 09:00:00.008000000")
# tdSql.checkData(9,0,"2018-09-17 09:00:00.009000000")
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
......@@ -14,7 +14,10 @@ python3 ./test.py -f 2-query/varchar.py
#python3 ./test.py -f 2-query/timezone.py
python3 ./test.py -f 2-query/Now.py
python3 ./test.py -f 2-query/Today.py
python3 ./test.py -f 2-query/max.py
python3 ./test.py -f 2-query/min.py
python3 ./test.py -f 2-query/count.py
# python3 ./test.py -f 2-query/Timediff.py
#python3 ./test.py -f 2-query/cast.py
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册