diff --git a/ibis/backends/duckdb/tests/test_client.py b/ibis/backends/duckdb/tests/test_client.py index 463414e4f484..8477535fbd33 100644 --- a/ibis/backends/duckdb/tests/test_client.py +++ b/ibis/backends/duckdb/tests/test_client.py @@ -413,11 +413,10 @@ def test_read_csv_with_types(tmp_path, input, all_varchar): assert t.schema()["geom"].is_geospatial() -def test_memtable_doesnt_leak(con, monkeypatch): - monkeypatch.setattr(ibis.options, "default_backend", con) - name = "memtable_doesnt_leak" +def test_memtable_doesnt_leak(con): + name = gen_name("memtable_doesnt_leak") assert name not in con.list_tables() - df = ibis.memtable({"a": [1, 2, 3]}, name=name).execute() + df = con.execute(ibis.memtable({"a": [1, 2, 3]}, name=name)) assert name not in con.list_tables() assert len(df) == 3