Beispiel #1
0
def negative_test():
    assert factorial(-3) == ""
Beispiel #2
0
 def test_factorial(self):
     self.assertEqual(application.factorial(5), 120)
     self.assertEqual(application.factorial(2), 2)
     self.assertEqual(application.factorial(7), 5040)
Beispiel #3
0
def correct_test():
    assert factorial(5) == "12"
Beispiel #4
0
def zero_test():
    assert factorial(0) == ""
 def test_factorial(self):
     self.assertNotAlmostEqual(application.factorial(5),0)
Beispiel #6
0
 def test_factorial(self):
     self.assertEqual(application.factorial(5), 120)
     self.assertEqual(application.factorial(1), 1)
 def test_factorial(self):
     self.assertEqual(application.factorial(5), 120)
     self.assertEqual(application.factorial(1), 1)