示例#1
0
 def test_known_inputs(self):
     for i in range(0, 20):
         self.assertEqual(fibonacci_recursive(i), fibonacci_loop(i))
示例#2
0
 def test_known_input(self):
     self.assertEqual(fibonacci_recursive(19), fibonacci_loop(19))
示例#3
0
 def test_zeroth_input(self):
     self.assertEqual(fibonacci_loop(0), 0)
示例#4
0
 def test_first_input(self):
     self.assertEqual(fibonacci_loop(1), 1)
 def test_fibonacci_loop(self):
     self.assertEqual(fibonacci_loop(self.n), self.value)