MCPcopy
hub / github.com/reflex-dev/reflex / _clear_exec_caches

Function _clear_exec_caches

docs/app/tests/test_docgen_double_eval.py:32–44  ·  view source on GitHub ↗

Reset the module-level caches so each test starts clean.

()

Source from the content-addressed store, hash-verified

30
31@pytest.fixture(autouse=True)
32def _clear_exec_caches():
33 """Reset the module-level caches so each test starts clean."""
34 from reflex_docs.docgen_pipeline import _executed_blocks, _file_modules
35
36 old_blocks = _executed_blocks.copy()
37 old_modules = _file_modules.copy()
38 _executed_blocks.clear()
39 _file_modules.clear()
40 yield
41 _executed_blocks.clear()
42 _executed_blocks.update(old_blocks)
43 _file_modules.clear()
44 _file_modules.update(old_modules)
45
46
47def _render_once(text: str, virtual_filepath: str = "test_double_eval.md"):

Callers

nothing calls this directly

Calls 3

copyMethod · 0.80
clearMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected