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

Method test_cache_recursive_update

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

Source from the content-addressed store, hash-verified

39
40 @staticmethod
41 def test_cache_recursive_update() -> None:
42 cache = Cache(
43 defs={},
44 hash="123",
45 cache_type="Pure",
46 stateful_refs=set(),
47 hit=True,
48 meta={},
49 )
50 scope = {}
51 ret = []
52 ret.append(ret)
53 cache.update(scope, {"return": ret})
54
55 stored = cache.meta["return"]
56 assert isinstance(stored, list)
57 assert len(stored) == 1
58 assert stored[0] is stored # Self-reference maintained
59
60 @staticmethod
61 def test_cache_scope_recursive() -> None:

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
CacheClass · 0.90
appendMethod · 0.45

Tested by

no test coverage detected