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

Method test_cache_ui_element_update

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

Source from the content-addressed store, hash-verified

137
138 @staticmethod
139 def test_cache_ui_element_update() -> None:
140 cache = Cache(
141 defs={},
142 hash="123",
143 cache_type="Pure",
144 stateful_refs=set(),
145 hit=True,
146 meta={},
147 )
148 scope = {}
149 ret = dropdown(options=[1, 2, 3])
150 cache.update(scope, {"return": ret})
151
152 stub = cache.meta["return"]
153
154 assert isinstance(stub, UIElementStub)
155
156 assert stub.load().options == ret.options
157 assert stub.load().value == ret.value
158
159 @staticmethod
160 def test_cache_basic_restore() -> None:

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
CacheClass · 0.90
dropdownClass · 0.90
loadMethod · 0.65

Tested by

no test coverage detected