Polish fibonacci challenge and solution (#91)

Update constraints, test cases, tests, and code.
This commit is contained in:
Donne Martin
2016-07-11 00:12:10 -04:00
committed by GitHub
parent cb660acd13
commit a868f1e597
3 changed files with 59 additions and 46 deletions

View File

@@ -5,10 +5,10 @@ class TestFib(object):
def test_fib(self, func):
result = []
for i in range(num_items):
expected = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
for i in range(len(expected)):
result.append(func(i))
fib_seq = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
assert_equal(result, fib_seq)
assert_equal(result, expected)
print('Success: test_fib')