Save then load returns the same result dict.
(tmp_file, cache_root)
| 59 | |
| 60 | |
| 61 | def test_cache_roundtrip(tmp_file, cache_root): |
| 62 | """Save then load returns the same result dict.""" |
| 63 | result = {"nodes": [{"id": "n1", "label": "Node1"}], "edges": []} |
| 64 | save_cached(tmp_file, result, root=cache_root) |
| 65 | loaded = load_cached(tmp_file, root=cache_root) |
| 66 | assert loaded == result |
| 67 | |
| 68 | |
| 69 | def test_cache_miss_on_change(tmp_file, cache_root): |
nothing calls this directly
no test coverage detected