Skip to content

Commit 3b3b10e

Browse files
committed
beef up tests
1 parent ff461ed commit 3b3b10e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/table/test_delete_orphans.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ def test_delete_orphaned_files(catalog: Catalog) -> None:
7979
# modify creation date to be older than 3 days
8080
five_days_ago = (datetime.now() - timedelta(days=5)).timestamp()
8181
os.utime(orphaned_file, (five_days_ago, five_days_ago))
82+
tbl.delete_orphaned_files()
83+
assert not orphaned_file.exists()
84+
85+
# assert that all known files still exist...
86+
all_known_files = tbl.inspect.all_known_files()
87+
for files in all_known_files.values():
88+
for file in files:
89+
assert Path(file).exists()
8290

8391

8492
def test_delete_orphaned_files_with_invalid_file_doesnt_error(catalog: Catalog) -> None:

0 commit comments

Comments
 (0)