def test_least_recently_used(self):
    x = LRUCache(3)
    (x[1], x[2], x[3]) = (1, 2, 3)
    self.assertEqual(list(x.keys()), [1, 2, 3])
    (x[4], x[5]) = (4, 5)
    self.assertEqual(list(x.keys()), [3, 4, 5])
    x[3]
    x[6] = 6
    self.assertEqual(list(x.keys()), [5, 3, 6])
    x[7] = 7
    self.assertEqual(list(x.keys()), [3, 6, 7])
def test_least_recently_used(self):
    x = LRUCache(3)
    (x[1], x[2], x[3]) = (1, 2, 3)
    self.assertEqual(list(x.keys()), [1, 2, 3])
    (x[4], x[5]) = (4, 5)
    self.assertEqual(list(x.keys()), [3, 4, 5])
    x[3]
    x[6] = 6
    self.assertEqual(list(x.keys()), [5, 3, 6])
    x[7] = 7
    self.assertEqual(list(x.keys()), [3, 6, 7])