Skip to content

Commit ca1c71b

Browse files
committed
test(conftest): apply cache isolation to module_tmp_data_dir fixture too
1 parent ce28547 commit ca1c71b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎tests/conftest.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,11 @@ def module_tmp_data_dir(tmp_path_factory):
349349
a way that would corrupt later tests in the same module. Tests that write
350350
embeddings, re-index, or mutate project files must keep function scope.
351351
"""
352+
from token_goat import compact as _compact_mod
353+
from token_goat import session as _session_mod
354+
355+
_session_mod._proc_load_cache.clear()
356+
_compact_mod._manifest_sha_written_this_process.clear()
352357
tmp_path = tmp_path_factory.mktemp("module_data")
353358
with patch.object(paths, "data_dir", return_value=tmp_path):
354359
yield tmp_path

0 commit comments

Comments
 (0)