Skip to content

Commit f0bb309

Browse files
committed
Updated test and added more comments
1 parent f5719c3 commit f0bb309

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_cache.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def test_cache_save_after_clear():
1616
cache_dir = "stumpy/__pycache__"
1717

1818
cache.clear(cache_dir)
19-
cache.save() # Saves nbi files only until njit funcs are called for the first time
19+
stump(T, m)
20+
cache.save() # Enable and save both `.nbi` and `.nbc` cache files
2021

21-
stump(T, m) # Saves nbc files, subsequent saves will write both nbi and nbc files
2222
ref_cache = cache._get_cache(cache_dir)
2323

2424
if numba.config.DISABLE_JIT:
@@ -28,7 +28,9 @@ def test_cache_save_after_clear():
2828

2929
cache.clear(cache_dir)
3030
assert len(cache._get_cache(cache_dir)) == 0
31-
cache.save() # Save both nbi and nbc files without needing to call `stump` function
31+
# Note that `stump(T, m)` has already been called once above and any subsequent
32+
# calls to `cache.save()` will automatically save both `.nbi` and `.nbc` cache files
33+
cache.save() # Save both `.nbi` and `.nbc` cache files
3234

3335
comp_cache = cache._get_cache(cache_dir)
3436

0 commit comments

Comments
 (0)