예제 #1
0
 def test_init_injectContainers(self):
     injectees = [20, 15, 10, 5, 5]
     cs = d17_eggnog.Containers(containers=injectees)
     self.assertEqual(set(injectees), set(cs.containers))
예제 #2
0
 def test_fInput1a(self):
     cs = d17_eggnog.Containers(fileName=self.fInput1a)
     self.assertEqual(654, len(cs.validPermutations(150)))
예제 #3
0
 def test_init_readContainers_type(self):
     cs = d17_eggnog.Containers(fileName=self.fInput1a)
     for c in cs.containers:
         msg = "<{}> is type {}".format(c, type(c))
         self.assertIsInstance(c, int, msg)
예제 #4
0
 def test_knownResults(self):
     injectees = [20, 15, 10, 5, 5]
     cs = d17_eggnog.Containers(containers=injectees)
     self.assertEqual(4, len(cs.validPermutations(25)))
예제 #5
0
 def test_init_readContainers_size(self):
     cs = d17_eggnog.Containers(fileName=self.fInput1a)
     self.assertEqual(20, len(cs.containers))