MCPcopy Index your code
hub / github.com/marimo-team/marimo / test_cache_miss

Method test_cache_miss

tests/_save/test_cache.py:524–548  ·  view source on GitHub ↗
(self, any_kernel: Kernel)

Source from the content-addressed store, hash-verified

522
523class TestAppCache:
524 async def test_cache_miss(self, any_kernel: Kernel) -> None:
525 k = any_kernel
526 await k.run(
527 [
528 ExecuteCellCommand(
529 cell_id="0",
530 code=textwrap.dedent(
531 """
532 from marimo._save.save import persistent_cache
533 from tests._save.loaders.mocks import MockLoader
534
535 with persistent_cache(
536 name="one", _loader=MockLoader()
537 ) as cache:
538 Y = 9
539 X = 10
540 Z = 3
541 """
542 ),
543 ),
544 ]
545 )
546 assert k.globals["Y"] == 9
547 assert k.globals["X"] == 10
548 assert k.globals["Z"] == 3
549
550 async def test_cache_hit(self, any_kernel: Kernel) -> None:
551 k = any_kernel

Callers

nothing calls this directly

Calls 2

ExecuteCellCommandClass · 0.90
runMethod · 0.45

Tested by

no test coverage detected