diff --git a/ibis/backends/tests/test_client.py b/ibis/backends/tests/test_client.py index 76de7c39e73c3..15dae2e1bf017 100644 --- a/ibis/backends/tests/test_client.py +++ b/ibis/backends/tests/test_client.py @@ -1727,7 +1727,6 @@ def test_insert_into_table_missing_columns(con, temp_table): assert result == expected_result -@pytest.mark.notyet(["druid"], raises=AssertionError, reason="can't drop tables") @pytest.mark.notyet( ["clickhouse", "flink"], raises=AssertionError, @@ -1742,30 +1741,24 @@ def test_insert_into_table_missing_columns(con, temp_table): ["bigquery"], raises=AssertionError, reason="test is flaky", strict=False ) def test_memtable_cleanup(con): - memtables = con._memtables - memtable_count = len(memtables) - name = ibis.util.gen_name("temp_memtable") t = ibis.memtable({"a": [1, 2, 3], "b": list("def")}, name=name) - op = t.op() # the table isn't registered until we actually execute, and since we # haven't yet executed anything, the table shouldn't be there - assert memtable_count == len(con._memtables) + assert name not in con.list_tables() # execute, which means the table is registered and should be visible in # con.list_tables() con.execute(t.select("a")) - assert len(con._memtables) == memtable_count + 1 + assert name in con.list_tables() con.execute(t.select("b")) - assert len(con._memtables) == memtable_count + 1 + assert name in con.list_tables() # remove all references to `t`, which means the `op` shouldn't be reachable - # and the table should thus be dropped and no longer visible in - # con.list_tables() - del t, op - assert len(con._memtables) == memtable_count + # and the table should thus be dropped and no longer visible + del t assert name not in con.list_tables()