コード例 #1
0
 def test_cache2 (self):
     l = [0]*1000000
     cycle = cache(l, 999999, 1)
     self.assert_(cycle == 259)
コード例 #2
0
 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)
コード例 #3
0
 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)