@@ -96,8 +96,7 @@ def test_manifest_cache_memory_growth(memory_catalog: InMemoryCatalog) -> None:
9696 # Sample memory at intervals
9797 if (i + 1 ) % 10 == 0 :
9898 current , _ = tracemalloc .get_traced_memory ()
99- cache = manifest_module ._manifest_cache
100- cache_size = len (cache ) if cache is not None else 0
99+ cache_size = len (manifest_module ._manifest_cache )
101100
102101 memory_samples .append ((i + 1 , current , cache_size ))
103102 print (f" Iteration { i + 1 } : Memory={ current / 1024 :.1f} KB, Cache entries={ cache_size } " )
@@ -152,8 +151,7 @@ def test_memory_after_gc_with_cache_cleared(memory_catalog: InMemoryCatalog) ->
152151
153152 gc .collect ()
154153 before_clear_memory , _ = tracemalloc .get_traced_memory ()
155- cache = manifest_module ._manifest_cache
156- cache_size_before = len (cache ) if cache is not None else 0
154+ cache_size_before = len (manifest_module ._manifest_cache )
157155 print (f" Memory before clear: { before_clear_memory / 1024 :.1f} KB" )
158156 print (f" Cache size: { cache_size_before } " )
159157
@@ -269,8 +267,7 @@ def test_manifest_cache_deduplication_efficiency() -> None:
269267 _manifests (io , list_path )
270268
271269 # Analyze cache efficiency
272- cache = manifest_module ._manifest_cache
273- cache_entries = len (cache ) if cache is not None else 0
270+ cache_entries = len (manifest_module ._manifest_cache )
274271 # List i contains manifests 0..i, so only the first num_lists manifests are actually used
275272 manifests_actually_used = num_lists
276273
0 commit comments