check len

This commit is contained in:
Will McGugan
2022-12-28 15:53:58 +00:00
parent 716db2c0d6
commit 5382f5eb49

View File

@@ -185,10 +185,12 @@ def test_lru_cache_len(keys: list[str], expected_len: int):
def test_fifo_cache():
cache = FIFOCache(4)
assert len(cache) == 0
assert not cache
assert "foo" not in cache
cache["foo"] = 1
assert "foo" in cache
assert len(cache) == 1
assert cache
cache["bar"] = 2
cache["baz"] = 3