()
| 274 | |
| 275 | @app.cell |
| 276 | def one() -> tuple[int]: |
| 277 | # Check top level import |
| 278 | from marimo import persistent_cache |
| 279 | from tests._save.loaders.mocks import MockLoader |
| 280 | |
| 281 | with persistent_cache(name="one", _loader=MockLoader()) as cache: |
| 282 | Y = 8 |
| 283 | X = 7 |
| 284 | assert X == 7 |
| 285 | assert cache._cache.defs == {"X": 7, "Y": 8} |
| 286 | assert cache.loader._saved |
| 287 | assert not cache.loader._loaded |
| 288 | return X, Y, persistent_cache |
| 289 | |
| 290 | # Coverage's trace override conflicts with cache introspection. Letting |
| 291 | # the first test fail seems to fix this issue. |
nothing calls this directly
no test coverage detected