Exemple #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))
Exemple #2
0
 def test_fInput1a(self):
     cs = d17_eggnog.Containers(fileName=self.fInput1a)
     self.assertEqual(654, len(cs.validPermutations(150)))
Exemple #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)
Exemple #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)))
Exemple #5
0
 def test_init_readContainers_size(self):
     cs = d17_eggnog.Containers(fileName=self.fInput1a)
     self.assertEqual(20, len(cs.containers))