Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
guenp committed Jul 29, 2024
1 parent 8971be9 commit 87bd585
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions duckdb_engine/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,14 @@ def test_with_cache(tmp_path: Path) -> None:
engine2 = create_engine(f"duckdb:///{tmp_db_path}?threads=2")
with engine1.connect() as conn1:
with engine2.connect() as conn2:
res1 = conn1.execute(text("select value from duckdb_settings() where name = 'threads'")).fetchall()
res2 = conn2.execute(text("select value from duckdb_settings() where name = 'threads'")).fetchall()
res1 = conn1.execute(
text("select value from duckdb_settings() where name = 'threads'")
).fetchall()
res2 = conn2.execute(
text("select value from duckdb_settings() where name = 'threads'")
).fetchall()
assert res1 == res2
assert res1[0][0] == '1'
assert res1[0][0] == "1"


def test_no_cache(tmp_path: Path) -> None:
Expand All @@ -626,8 +630,12 @@ def test_no_cache(tmp_path: Path) -> None:
engine2 = create_engine(f"duckdb:///{tmp_db_path}?threads=2&user=2")
with engine1.connect() as conn1:
with engine2.connect() as conn2:
res1 = conn1.execute(text("select value from duckdb_settings() where name = 'threads'")).fetchall()
res2 = conn2.execute(text("select value from duckdb_settings() where name = 'threads'")).fetchall()
res1 = conn1.execute(
text("select value from duckdb_settings() where name = 'threads'")
).fetchall()
res2 = conn2.execute(
text("select value from duckdb_settings() where name = 'threads'")
).fetchall()
assert res1 != res2
assert res1[0][0] == '1'
assert res2[0][0] == '2'
assert res1[0][0] == "1"
assert res2[0][0] == "2"

0 comments on commit 87bd585

Please sign in to comment.