def test_clear(self): d = LRUCache(3) d["a"] = 1 d["b"] = 2 d["c"] = 3 d.clear() assert d.__getstate__() == {"capacity": 3, "_mapping": {}, "_queue": deque([])}
def test_clear(self): d = LRUCache(3) d["a"] = 1 d["b"] = 2 d["c"] = 3 d.clear() assert d.__getstate__() == { 'capacity': 3, '_mapping': {}, '_queue': deque([]) }