Skip to content

Commit 17cf723

Browse files
committed
Make test_sql.py sqlite_conn tests parallelizable
1 parent 0c51e04 commit 17cf723

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pandas/tests/io/test_sql.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2435,10 +2435,13 @@ def test_not_reflect_all_tables(sqlite_conn):
24352435
from sqlalchemy import text
24362436
from sqlalchemy.engine import Engine
24372437

2438+
invalid_uuid = table_uuid_gen("invalid")
2439+
other_uuid = table_uuid_gen("other_table")
2440+
24382441
# create invalid table
24392442
query_list = [
2440-
text("CREATE TABLE invalid (x INTEGER, y UNKNOWN);"),
2441-
text("CREATE TABLE other_table (x INTEGER, y INTEGER);"),
2443+
text(f"CREATE TABLE {invalid_uuid} (x INTEGER, y UNKNOWN);"),
2444+
text(f"CREATE TABLE {other_uuid} (x INTEGER, y INTEGER);"),
24422445
]
24432446

24442447
for query in query_list:
@@ -2451,8 +2454,8 @@ def test_not_reflect_all_tables(sqlite_conn):
24512454
conn.execute(query)
24522455

24532456
with tm.assert_produces_warning(None):
2454-
sql.read_sql_table("other_table", conn)
2455-
sql.read_sql_query("SELECT * FROM other_table", conn)
2457+
sql.read_sql_table(other_uuid, conn)
2458+
sql.read_sql_query(f"SELECT * FROM {other_uuid}", conn)
24562459

24572460

24582461
@pytest.mark.parametrize("conn", all_connectable)

0 commit comments

Comments
 (0)