From 1917b4860bda0d4e9b98dcf95c2429ea67e4166e Mon Sep 17 00:00:00 2001 From: Paul Mathew Date: Wed, 6 May 2026 18:00:38 -0400 Subject: [PATCH] fix(tests): isolate state in test_write_optional_list `test_write_optional_list` uses `create_table_if_not_exists` and then asserts exact row counts after two `tbl.append()` calls. On any subsequent run the table is reused, so the asserted counts (2, then 4) become 6, 10, ... and the test fails. The failure only surfaces when the integration suite is replayed without a fresh docker-compose stack, which masks the bug in CI but makes it a papercut for local development. Drop the table at the start to guarantee a clean slate, matching the pattern used by `_create_table()` for every other write test in this module. --- tests/integration/test_writes/test_writes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_writes/test_writes.py b/tests/integration/test_writes/test_writes.py index 0a09867656..b6fc7067f6 100644 --- a/tests/integration/test_writes/test_writes.py +++ b/tests/integration/test_writes/test_writes.py @@ -2027,7 +2027,7 @@ def test_write_optional_list(session_catalog: Catalog) -> None: required=False, ), ) - session_catalog.create_table_if_not_exists(identifier, schema) + _create_table(session_catalog, identifier, schema=schema) df_1 = pa.Table.from_pylist( [