MCPcopy
hub / github.com/marimo-team/marimo / test_cache_scope_recursive

Method test_cache_scope_recursive

tests/_save/test_cache.py:61–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59
60 @staticmethod
61 def test_cache_scope_recursive() -> None:
62 _list = []
63 _list.append(_list)
64 d = {}
65 d["self"] = d
66 scope = {
67 "_list": _list,
68 "_dict": d,
69 }
70 cache = Cache(
71 defs=scope,
72 hash="123",
73 cache_type="Pure",
74 stateful_refs=set(),
75 hit=True,
76 meta={},
77 )
78
79 # Force update to trigger stubbing.
80 cache.update(scope, {"return": None})
81 assert "_list" in cache.defs
82 assert "_dict" in cache.defs
83
84 @staticmethod
85 @patch("marimo._save._cache_module.ModuleStub", TestableModuleStub)

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
CacheClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected