def test_one(self): r = RecS(100, 5, 0.01) r.update(17, 42) for i in xrange(100): ind, val = random.randint(0, 99), random.randint(1, 25) r.update(ind, val) r.update(ind, -val) self.assertTrue(r.touched()) self.assertEqual(r.recover(), {17: 42})
def test_touched(self): r = RecS(100, 5, 0.01) self.assertFalse(r.touched())