def test_cache2 (self): l = [0]*1000000 cycle = cache(l, 999999, 1) self.assert_(cycle == 259)
def test_cache3 (self): l = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] cycle = cache(l, 5, 1) self.assert_(l[16] == 5)
def test_cache1 (self): l = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] cycle = cache(l, 1, 1) self.assert_(cycle == 1)