Skip to content

Commit

Permalink
test(duckdb): test multiple connections to named in-memory db (#9242)
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth authored May 23, 2024
1 parent 67460aa commit 10afc98
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ibis/backends/duckdb/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,19 @@ def test_settings_repr():
view = repr(con.settings)
assert "name" in view
assert "value" in view


def test_connect_named_in_memory_db():
con_named_db = ibis.duckdb.connect(":memory:mydb")

con_named_db.create_table("ork", schema=ibis.schema(dict(bork="int32")))
assert "ork" in con_named_db.list_tables()

con_named_db_2 = ibis.duckdb.connect(":memory:mydb")
assert "ork" in con_named_db_2.list_tables()

unnamed_memory_db = ibis.duckdb.connect(":memory:")
assert "ork" not in unnamed_memory_db.list_tables()

default_memory_db = ibis.duckdb.connect()
assert "ork" not in default_memory_db.list_tables()

0 comments on commit 10afc98

Please sign in to comment.