[pypy-commit] pypy py3k: fix failing tests -- ranges are iterators now
MichaelBlume
noreply at buildbot.pypy.org
Mon Mar 12 20:01:40 CET 2012
Author: Mike Blume <mike at loggly.com>
Branch: py3k
Changeset: r53326:95927cbaa0c9
Date: 2012-03-12 11:32 -0700
http://bitbucket.org/pypy/pypy/changeset/95927cbaa0c9/
Log: fix failing tests -- ranges are iterators now
diff --git a/pypy/module/_collections/test/test_deque.py b/pypy/module/_collections/test/test_deque.py
--- a/pypy/module/_collections/test/test_deque.py
+++ b/pypy/module/_collections/test/test_deque.py
@@ -13,17 +13,17 @@
d.append(i)
for i in reversed(range(-200, 0)):
d.appendleft(i)
- assert list(d) == range(-200, 400)
+ assert list(d) == list(range(-200, 400))
assert len(d) == 600
left = [d.popleft() for i in range(250)]
- assert left == range(-200, 50)
- assert list(d) == range(50, 400)
+ assert left == list(range(-200, 50))
+ assert list(d) == list(range(50, 400))
right = [d.pop() for i in range(250)]
right.reverse()
- assert right == range(150, 400)
- assert list(d) == range(50, 150)
+ assert right == list(range(150, 400))
+ assert list(d) == list(range(50, 150))
def test_maxlen(self):
from _collections import deque
@@ -33,7 +33,7 @@
d = deque(it, maxlen=3)
assert list(it) == []
assert repr(d) == 'deque([7, 8, 9], maxlen=3)'
- assert list(d) == range(7, 10)
+ assert list(d) == list(range(7, 10))
d.appendleft(3)
assert list(d) == [3, 7, 8]
d.extend([20, 21])
More information about the pypy-commit
mailing list