def test_fact(self): #This function tests whether result is equal to factorial self.assertEqual(factorial(5), 120)
def test_factorial_1(app): try: assert app.factorial(1) == 1 except AttributeError: raise AttributeError("The function 'factorial' should return the value 1")
def test_factorial_8(app): try: assert app.factorial(8) == 40320 except AttributeError: raise AttributeError("The function 'factorial' should return the value 40320")
def test_factorial_1(self): self.assertEqual(factorial(1), 1)
def test_factorial_1(self): self.assertEqual(factorial(1), 1) # if __name__ == '__main__': # unittest.main()
def test_factorial_4(self): self.assertEqual(factorial(4), 24)