Skip to content

Commit

Permalink
test: ensure that tables are dropped in test_create_table_in_memory
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Sep 15, 2024
1 parent 13420be commit 246e1ba
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ibis/backends/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,15 +1003,13 @@ def test_self_join_memory_table(backend, con, monkeypatch):
)
def test_create_table_in_memory(con, obj, table_name, monkeypatch):
monkeypatch.setattr(ibis.options, "default_backend", con)
obj = obj()
t = con.create_table(table_name, obj)
t = con.create_table(table_name, obj())

result = pa.table({"a": ["a"], "b": [1]})
assert table_name in con.list_tables()

assert result.equals(t.to_pyarrow())

con.drop_table(table_name, force=True)
try:
assert table_name in con.list_tables()
assert pa.table({"a": ["a"], "b": [1]}).equals(t.to_pyarrow())
finally:
con.drop_table(table_name, force=True)


def test_default_backend_option(con, monkeypatch):
Expand Down

0 comments on commit 246e1ba

Please sign in to comment.