mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-05 00:48:03 +00:00
Changed xrange to range to be compatible with Python 3.
This commit is contained in:
@@ -2,10 +2,10 @@ from nose.tools import assert_equal
|
||||
|
||||
|
||||
class TestFib(object):
|
||||
|
||||
|
||||
def test_fib(self, func):
|
||||
result = []
|
||||
for i in xrange(num_items):
|
||||
for i in range(num_items):
|
||||
result.append(func(i))
|
||||
fib_seq = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
|
||||
assert_equal(result, fib_seq)
|
||||
|
||||
Reference in New Issue
Block a user