From 507d544fca1b08917e74190739a4d602276153e9 Mon Sep 17 00:00:00 2001 From: jiacy-jcy <714897623@qq.com> Date: Fri, 29 Apr 2022 09:32:57 +0800 Subject: [PATCH] add to_unixtimestamp case --- tests/system-test/2-query/To_unixtimestamp.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/system-test/2-query/To_unixtimestamp.py diff --git a/tests/system-test/2-query/To_unixtimestamp.py b/tests/system-test/2-query/To_unixtimestamp.py new file mode 100644 index 0000000000..7088142f9a --- /dev/null +++ b/tests/system-test/2-query/To_unixtimestamp.py @@ -0,0 +1,52 @@ +from time import sleep + +from util.log import * +from util.sql import * +from util.cases import * + + + + +class TDTestCase: + + def init(self, conn, logSql): + tdLog.debug(f"start to excute {__file__}") + tdSql.init(conn.cursor()) + + def run(self): # sourcery skip: extract-duplicate-method + tdSql.prepare() + tdLog.printNoPrefix("==========step1:create tables==========") + tdSql.execute( + '''create table if not exists ntb + (ts timestamp, c1 int, c2 float,c3 double,c4 timestamp) + ''' + ) + tdSql.execute( + '''create table if not exists stb + (ts timestamp, c1 int, c2 float,c3 double,c4 timestamp) tags(t0 int) + ''' + ) + tdSql.execute( + '''create table if not exists stb_1 using stb tags(100) + ''' + ) + tdLog.printNoPrefix("==========step2:insert data into ntb==========") + + + + + + + + + + + + + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) \ No newline at end of file -- GitLab