Skip to content

Commit 0d956cf

Browse files
committed
Assert the delete snapshot exists before reading its properties
1 parent 515fab1 commit 0d956cf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/table/test_init.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2615,7 +2615,10 @@ def test_delete_files_removes_data_files(catalog: Catalog) -> None:
26152615

26162616
table = catalog.load_table("default.delete_files")
26172617
assert table.scan().to_arrow().to_pylist() == [{"x": 1}, {"x": 2}]
2618-
assert table.current_snapshot().summary.additional_properties["source"] == "test"
2618+
snapshot = table.current_snapshot()
2619+
assert snapshot is not None
2620+
assert snapshot.summary is not None
2621+
assert snapshot.summary.additional_properties["source"] == "test"
26192622

26202623

26212624
def test_delete_files_rejects_missing_and_duplicate_paths(catalog: Catalog) -> None:

0 commit comments

Comments
 (0)