From 883d128e58cbd59860c815552f7592e122035100 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 9 Mar 2022 19:28:58 +0800 Subject: [PATCH] [TS-207](query): fixed case error --- tests/develop-test/0-others/json_tag.py | 3 --- tests/develop-test/2-query/function_mode.py | 2 +- tests/pytest/functions/function_stddev.py | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/develop-test/0-others/json_tag.py b/tests/develop-test/0-others/json_tag.py index 26f582bc93..d3891a796a 100644 --- a/tests/develop-test/0-others/json_tag.py +++ b/tests/develop-test/0-others/json_tag.py @@ -17,7 +17,6 @@ from util.log import tdLog from util.cases import tdCases from util.sql import tdSql import json -import site class TDTestCase: @@ -35,8 +34,6 @@ class TDTestCase: def run(self): tdSql.prepare() - print("print sitepackage path: ") - print(site.getsitepackages()) print("============== STEP 1 ===== prepare data & validate json string") tdSql.error("create table if not exists jsons1(ts timestamp, dataInt int, dataBool bool, dataStr nchar(50), dataStrBin binary(150)) tags(jtag json, tagint int)") tdSql.error("create table if not exists jsons1(ts timestamp, data json) tags(tagint int)") diff --git a/tests/develop-test/2-query/function_mode.py b/tests/develop-test/2-query/function_mode.py index 7cc089ab33..202165df47 100644 --- a/tests/develop-test/2-query/function_mode.py +++ b/tests/develop-test/2-query/function_mode.py @@ -144,7 +144,7 @@ class TDTestCase: tdSql.checkData(1, 1, "d002") #group by tag - tdSql.query('select mode(ddouble) from smode group by location') + tdSql.query('select mode(ddouble) from smode group by location order by location desc') tdSql.checkRows(2) tdSql.checkData(0, 0, 4.982392323) tdSql.checkData(0, 1, "Beijing.haidian") diff --git a/tests/pytest/functions/function_stddev.py b/tests/pytest/functions/function_stddev.py index b9eadeb344..65aec6ddac 100644 --- a/tests/pytest/functions/function_stddev.py +++ b/tests/pytest/functions/function_stddev.py @@ -135,9 +135,9 @@ class TDTestCase: tdSql.execute("insert into std3 values(now + 5s, 4);") tdSql.execute("insert into std3 values(now + 6s, 8);") tdSql.query("select stddev(col1) from stdtable group by loc;") - tdSql.checkData(0, 0, 2.0) + tdSql.checkData(2, 0, 2.0) tdSql.checkData(1, 0, 0.5) - tdSql.checkData(2, 0, 0.5) + tdSql.checkData(0, 0, 0.5) tdSql.execute("create table stdtableint(ts timestamp, col1 int) tags(num int)") tdSql.execute("create table stdint1 using stdtableint tags(1)") -- GitLab