MCPcopy
hub / github.com/uber/petastorm / test_cleanup_cache_with_null_cache

Function test_cleanup_cache_with_null_cache

petastorm/tests/test_reader.py:118–127  ·  view source on GitHub ↗

Test that cleanup_cache works properly with null cache

(synthetic_dataset, capsys)

Source from the content-addressed store, hash-verified

116
117
118def test_cleanup_cache_with_null_cache(synthetic_dataset, capsys):
119 """Test that cleanup_cache works properly with null cache"""
120 with make_reader(synthetic_dataset.url, cache_type='null') as reader:
121 next(reader)
122 # Manually call cleanup_cache to test it
123 reader.cleanup_cache()
124
125 # Check that cleanup message was printed
126 captured = capsys.readouterr()
127 assert "Cache cleanup complete." in captured.out
128
129
130def test_cleanup_cache_manual_call(synthetic_dataset, tmpdir):

Callers

nothing calls this directly

Calls 2

make_readerFunction · 0.90
cleanup_cacheMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…