

def test_setdefault(self):
    cache = LruCache(1)
    self.assertEquals(cache.setdefault('key', 1), 1)
    self.assertEquals(cache.get('key'), 1)
    self.assertEquals(cache.setdefault('key', 2), 1)
    self.assertEquals(self.get('key'), 1)

dataset/ETHPy150Open matrix-org/synapse/tests/util/test_lrucache.py LruCacheTestCase.test_setdefault/VarMisuse@67/81 `cache`->`self`