def test_fib_10(self): self.assertEqual(1, fibonacci.fibonacci_recursive(3)) self.assertEqual(3, fibonacci.fibonacci_recursive(5)) self.assertEqual(34, fibonacci.fibonacci_recursive(10))
def test_fib_negative(self): with self.assertRaises(TypeError) : fibonacci.fibonacci_recursive(-1) with self.assertRaises(TypeError) : fibonacci.fibonacci_recursive(0)
def test_fib_base(self): self.assertEqual(0, fibonacci.fibonacci_recursive(1)) self.assertEqual(1, fibonacci.fibonacci_recursive(2))