From c46259b627a7467ca9a7ef4037da1c0ce3a7e386 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Mon, 18 Oct 2021 14:20:21 +0800 Subject: [PATCH] add test case --- tests/pytest/stable/json_tag.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/pytest/stable/json_tag.py b/tests/pytest/stable/json_tag.py index c06974c777..5fecf3fc3a 100644 --- a/tests/pytest/stable/json_tag.py +++ b/tests/pytest/stable/json_tag.py @@ -209,11 +209,19 @@ class TDTestCase: tdSql.query("select jtag from db_json_tag_test.jsons1 where jtag is not null") tdSql.checkRows(5) - #tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'location'='null'") - #tdSql.checkRows(5) + tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'location' is not null") + tdSql.checkRows(3) + + tdSql.query("select tbname,jtag from db_json_tag_test.jsons1 where jtag->'location' is null") + tdSql.checkRows(6) + + tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'num' is not null") + tdSql.checkRows(2) + + tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'location'='null'") + tdSql.checkRows(0) - #tdSql.query("select * from db_json_tag_test.jsons1 where jtag->'num'='null'") - #tdSql.checkRows(5) + tdSql.error("select * from db_json_tag_test.jsons1 where jtag->'num'='null'") def stop(self): tdSql.close() -- GitLab