You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/02/22 02:16:07 UTC

[iotdb] branch fix_python_it created (now 315ba91c29)

This is an automated email from the ASF dual-hosted git repository.

haonan pushed a change to branch fix_python_it
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 315ba91c29 Fix python IT fail caused by the database root.__system

This branch includes the following new commits:

     new 315ba91c29 Fix python IT fail caused by the database root.__system

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: Fix python IT fail caused by the database root.__system

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch fix_python_it
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 315ba91c291533c9f36e4e827dc62b41580cae14
Author: HTHou <hh...@outlook.com>
AuthorDate: Wed Feb 22 10:14:00 2023 +0800

    Fix python IT fail caused by the database root.__system
---
 client-py/iotdb/sqlalchemy/tests/test_dialect.py | 2 +-
 client-py/tests/test_dataframe.py                | 4 ++--
 client-py/tests/test_todf.py                     | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/client-py/iotdb/sqlalchemy/tests/test_dialect.py b/client-py/iotdb/sqlalchemy/tests/test_dialect.py
index ac8bde6ed2..7277b2dfc5 100644
--- a/client-py/iotdb/sqlalchemy/tests/test_dialect.py
+++ b/client-py/iotdb/sqlalchemy/tests/test_dialect.py
@@ -66,7 +66,7 @@ def test_dialect():
         insp = inspect(eng)
         # test get_schema_names
         schema_names = insp.get_schema_names()
-        if not operator.eq(schema_names, ["root.cursor_s1", "root.cursor"]):
+        if not operator.contains(schema_names, ["root.cursor_s1", "root.cursor"]):
             test_fail()
             print_message("test get_schema_names failed!")
         # test get_table_names
diff --git a/client-py/tests/test_dataframe.py b/client-py/tests/test_dataframe.py
index d4ff2e4cef..a8ecd1fee9 100644
--- a/client-py/tests/test_dataframe.py
+++ b/client-py/tests/test_dataframe.py
@@ -33,7 +33,7 @@ def test_simple_query():
         session.insert_str_record("root.device0", 123, "pressure", "15.0")
 
         # Read
-        session_data_set = session.execute_query_statement("SELECT ** FROM root")
+        session_data_set = session.execute_query_statement("SELECT ** FROM root.device0.**")
         df = session_data_set.todf()
 
         session.close()
@@ -53,7 +53,7 @@ def test_non_time_query():
         session.insert_str_record("root.device0", 123, "pressure", "15.0")
 
         # Read
-        session_data_set = session.execute_query_statement("SHOW TIMESERIES")
+        session_data_set = session.execute_query_statement("SHOW TIMESERIES root.device0.**")
         df = session_data_set.todf()
 
         session.close()
diff --git a/client-py/tests/test_todf.py b/client-py/tests/test_todf.py
index a7fcec0fc2..6fce1cd18d 100644
--- a/client-py/tests/test_todf.py
+++ b/client-py/tests/test_todf.py
@@ -93,7 +93,7 @@ def test_simple_query():
 
         df_input.insert(0, "Time", timestamps)
 
-        session_data_set = session.execute_query_statement("SELECT ** FROM root")
+        session_data_set = session.execute_query_statement("SELECT ** FROM root.wt1")
         df_output = session_data_set.todf()
         df_output = df_output[df_input.columns.tolist()]
 
@@ -173,7 +173,7 @@ def test_with_null_query():
 
         df_input.insert(0, "Time", timestamps)
 
-        session_data_set = session.execute_query_statement("SELECT ** FROM root")
+        session_data_set = session.execute_query_statement("SELECT ** FROM root.wt1")
         df_output = session_data_set.todf()
         df_output = df_output[df_input.columns.tolist()]
 
@@ -210,7 +210,7 @@ def test_multi_fetch():
 
         df_input.insert(0, "Time", timestamps)
 
-        session_data_set = session.execute_query_statement("SELECT ** FROM root")
+        session_data_set = session.execute_query_statement("SELECT ** FROM root.wt1")
         session_data_set.set_fetch_size(100)
         df_output = session_data_set.todf()
         df_output = df_output[df_input.columns.tolist()]