

def test_del_multi(self):
    cache = LruCache(4, 2, cache_type=TreeCache)
    cache[('animal', 'cat')] = 'mew'
    cache[('animal', 'dog')] = 'woof'
    cache[('vehicles', 'car')] = 'vroom'
    cache[('vehicles', 'train')] = 'chuff'
    self.assertEquals(len(cache), 4)
    self.assertEquals(cache.get(('animal', 'cat')), 'mew')
    self.assertEquals(cache.get(('vehicles', 'car')), 'vroom')
    self.del_multi(('animal',))
    self.assertEquals(len(cache), 2)
    self.assertEquals(cache.get(('animal', 'cat')), None)
    self.assertEquals(cache.get(('animal', 'dog')), None)
    self.assertEquals(cache.get(('vehicles', 'car')), 'vroom')
    self.assertEquals(cache.get(('vehicles', 'train')), 'chuff')

dataset/ETHPy150Open matrix-org/synapse/tests/util/test_lrucache.py LruCacheTestCase.test_del_multi/VarMisuse@115/170 `cache`->`self`