Skip to content

Commit c3be063

Browse files
committed
Parallelize test_sql.py - minor fixes to get through CI
1 parent de62a67 commit c3be063

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/tests/io/test_sql.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ def drop_view(
636636
sqlite3.Connection | sqlalchemy.engine.Engine | sqlalchemy.engine.Connection
637637
),
638638
):
639-
import sqlalchemy
639+
sqlalchemy = pytest.importorskip("sqlalchemy")
640640
from sqlalchemy import Engine
641641

642642
if isinstance(conn, sqlite3.Connection):
@@ -1209,7 +1209,12 @@ def connect_and_uuid(request, types_data):
12091209
if isinstance(conn, str):
12101210
sqlalchemy = pytest.importorskip("sqlalchemy")
12111211
conn = sqlalchemy.create_engine(conn)
1212-
drop_table_uuid_views(conn, table_uuid, view_uuid)
1212+
drop_table_uuid_views(conn, table_uuid, view_uuid)
1213+
conn.dispose()
1214+
else:
1215+
drop_table_uuid_views(conn, table_uuid, view_uuid)
1216+
1217+
12131218

12141219

12151220
@pytest.mark.parametrize(
@@ -1343,7 +1348,6 @@ def test_to_sql(connect_and_uuid, method, test_frame1, request):
13431348
def test_to_sql_exist(connect_and_uuid, mode, num_row_coef, test_frame1, request):
13441349
conn = connect_and_uuid["conn"]
13451350
table_uuid = connect_and_uuid["table_uuid"]
1346-
conn_name = connect_and_uuid["conn_name"]
13471351

13481352
with pandasSQL_builder(conn, need_transaction=True) as pandasSQL:
13491353
pandasSQL.to_sql(test_frame1, table_uuid, if_exists="fail")

0 commit comments

Comments
 (0)