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

Method test_cache_comment_line

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

Source from the content-addressed store, hash-verified

761 assert k.globals["Y"] == 2
762
763 async def test_cache_comment_line(self, any_kernel: Kernel) -> None:
764 k = any_kernel
765 await k.run(
766 [
767 ExecuteCellCommand(
768 cell_id="0",
769 code=textwrap.dedent(
770 """
771 from marimo._save.save import persistent_cache
772 from tests._save.loaders.mocks import MockLoader
773
774 with persistent_cache(name="one", _loader=MockLoader()):
775 # Comment
776
777 # whitespace
778 X = 1 # Comment
779 Y = 2
780 """
781 ),
782 ),
783 ]
784 )
785 assert not k.stderr.messages, k.stderr
786 assert k.errors == {}
787 assert k.errors == {}
788 assert k.globals["X"] == 1
789 assert k.globals["Y"] == 2
790
791
792class TestStateCache:

Callers

nothing calls this directly

Calls 2

ExecuteCellCommandClass · 0.90
runMethod · 0.45

Tested by

no test coverage detected