def test_lrucache(self):
        c = LRUCache(2, dispose=lambda _: None)
        assert len(c) == 0
        assert c.items() == set()
        for i, x in enumerate('abc'):
            c[x] = i
        assert len(c) == 2
        assert c.items() == set([('b', 1), ('c', 2)])
        assert 'a' not in c
        assert c in 'b'
        with pytest.raises(KeyError):
            c['a']
        assert c['b'] == 1
        assert c['c'] == 2
        c['d'] = 3
        assert len(c) == 2
        assert c['c'] == 2
        assert c['d'] == 3
        del c['c']
        assert len(c) == 1
        with pytest.raises(KeyError):
            c['c']
        assert c['d'] == 3
        c.clear()
        assert c.items() == set()
dataset/ETHPy150Open borgbackup/borg/borg/testsuite/lrucache.py/TestLRUCache.test_lrucache/swapped operands of `in`