def test_factorial_of_1(self): self.assertEqual(1, factorial(1))
def test_factorial_of_5(self): self.assertEqual(120, factorial(5))
def test_factorial_of_2(self): self.assertEqual(2, factorial(2))
def test_factorial_of_3(self): self.assertEqual(6, factorial(3))
#!/usr/bin/python import sys from library import factorial number = int(sys.argv[1]) factorial = factorial(number) print('{0}! = {1}'.format(number, factorial))