MCPcopy Create free account
hub / github.com/pydata/xarray / test_on_evict

Function test_on_evict

xarray/tests/test_backends_lru_cache.py:62–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def test_on_evict() -> None:
63 on_evict = mock.Mock()
64 cache = LRUCache(maxsize=1, on_evict=on_evict)
65 cache["x"] = 1
66 cache["y"] = 2
67 on_evict.assert_called_once_with("x", 1)
68
69
70def test_on_evict_trivial() -> None:

Callers

nothing calls this directly

Calls 1

LRUCacheClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…