Exemple #1
0
 def test_iterative_factorial_wrong_values(self) :
     for n in self.wrong_values :
         with self.assertRaises(ValueError) :
             numbers.iterative_factorial(n)
Exemple #2
0
 def test_iterative_factorial_known_values(self) :
     for n, factorial in self.known_values.items() :
         self.assertEqual(factorial, numbers.iterative_factorial(n))