Skip to content

Commit

Permalink
skip unneeded sqlite drop tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilo59 committed Sep 13, 2023
1 parent f7b2b76 commit 5f75854
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/datasource/fluent/integration/test_sql_datasources.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
# NOTE: can we create tables in trino?
# some of the trino tests probably don't make sense if we can't create tables
DO_NOT_CREATE_TABLES: set[str] = {"trino"}
# sqlite db files should be using fresh tmp_path on every test
DO_NOT_DROP_TABLES: set[str] = {"sqlite"}

DatabaseType: TypeAlias = Literal[
"databricks_sql", "postgres", "snowflake", "sqlite", "trino"
Expand Down Expand Up @@ -268,6 +270,9 @@ def _table_factory(
# teardown
print(f"dropping tables\n{pf(all_created_tables)}")
for dialect, tables in all_created_tables.items():
if dialect in DO_NOT_DROP_TABLES:
print(f"skipping drop for {dialect}")
continue
engine = engines[dialect]
with engine.connect() as conn:
transaction = conn.begin()
Expand Down

0 comments on commit 5f75854

Please sign in to comment.