def test6(self):
     self.assertEqual(fibonacci.factorial(2), 2)
 def test7(self):
     self.assertEqual(fibonacci.factorial(4), 24)
Exemple #3
0
def test_factThree():
    assert factorial(3) == 6
Exemple #4
0
def test_factSeven():
    assert factorial(7) == 5040
Exemple #5
0
 def test_neg_fac(self):
     self.assertEqual(fibonacci.factorial(-3), None)
Exemple #6
0
 def test_zero_one_fac(self):
     self.assertEqual(fibonacci.factorial(0), 1)
     self.assertEqual(fibonacci.factorial(1), 1)
Exemple #7
0
 def testFacBaseCase(self):
     self.assertEqual(fibonacci.factorial(0), 1)
     self.assertEqual(fibonacci.factorial(1), 1)
Exemple #8
0
 def test_n_fac(self):
     self.assertEqual(fibonacci.factorial(3), 6)
     self.assertEqual(fibonacci.factorial(5), 120)
     self.assertEqual(fibonacci.factorial(4), 24)
 def test5_fact(self):
     self.assertEqual(factorial(8), 40320)
 def test4_fact(self):
     self.assertEqual(factorial(5), 120)
 def test3_fact(self):
     self.assertEqual(factorial(2), 2)
 def test2_fact(self):
     self.assertEqual(factorial(1), 1)
 def test1_fact(self):
     self.assertEqual(factorial(0), 1)