Skip to content

Commit 1917b48

Browse files
author
Paul Mathew
committed
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.
1 parent d008a04 commit 1917b48

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/integration/test_writes/test_writes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ def test_write_optional_list(session_catalog: Catalog) -> None:
20272027
required=False,
20282028
),
20292029
)
2030-
session_catalog.create_table_if_not_exists(identifier, schema)
2030+
_create_table(session_catalog, identifier, schema=schema)
20312031

20322032
df_1 = pa.Table.from_pylist(
20332033
[

0 commit comments

Comments
 (0)