

def test_eviction(self):
    cache = LruCache(2)
    cache[1] = 1
    cache[2] = 2
    self.assertEquals(self.get(1), 1)
    self.assertEquals(cache.get(2), 2)
    cache[3] = 3
    self.assertEquals(cache.get(1), None)
    self.assertEquals(cache.get(2), 2)
    self.assertEquals(cache.get(3), 3)

dataset/ETHPy150Open matrix-org/synapse/tests/util/test_lrucache.py LruCacheTestCase.test_eviction/VarMisuse@35/41 `cache`->`self`