Esempio n. 1
0
 def test_50(self):
     bag = easy.finite_bag(50, self.pieces)
     result = collections.Counter(bag)
     eight = False
     for _, v in result.iteritems():
         try:
             self.assertEqual(v, 7)
         except AssertionError as error:
             if not eight:
                 self.assertEqual(v, 8)
                 eight = True
             else:
                 raise error
Esempio n. 2
0
 def test_14(self):
     bag = easy.finite_bag(14, self.pieces)
     result = collections.Counter(bag)
     for k, v in result.iteritems():
         self.assertEqual(v, 2)