Beispiel #1
0
 def test_compare(self):
     h = History([C, D, C], [C, C, C])
     self.assertEqual(h, [C, D, C])
     h2 = History([C, D, C], [C, C, C])
     self.assertEqual(h, h2)
     h2.reset()
     self.assertNotEqual(h, h2)
Beispiel #2
0
 def test_reset(self):
     h = History()
     h.append(C, D)
     self.assertEqual(len(h), 1)
     self.assertEqual(h.cooperations, 1)
     h.reset()
     self.assertEqual(len(h), 0)
     self.assertEqual(h.cooperations, 0)