[pypy-commit] pypy set-strategies: Failing test.
arigo
noreply at buildbot.pypy.org
Mon Mar 26 20:08:16 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: set-strategies
Changeset: r54004:84913cf56f5e
Date: 2012-03-26 19:54 +0200
http://bitbucket.org/pypy/pypy/changeset/84913cf56f5e/
Log: Failing test.
diff --git a/pypy/objspace/std/test/test_listobject.py b/pypy/objspace/std/test/test_listobject.py
--- a/pypy/objspace/std/test/test_listobject.py
+++ b/pypy/objspace/std/test/test_listobject.py
@@ -1181,6 +1181,16 @@
assert l == []
assert list(g) == []
+ def test_uses_custom_iterator(self):
+ for base, arg in [(list, []), (list, [5]), (list, ['x']),
+ (dict, []), (dict, [(5,6)]), (dict, [('x',7)]),
+ (tuple, []), (tuple, [5]), (tuple, ['x']),
+ (str, 'hello'), (unicode, 'hello')]:
+ class SubClass(base):
+ def __iter__(self):
+ return iter("foobar")
+ assert list(SubClass(arg)) == ['f', 'o', 'o', 'b', 'a', 'r']
+
class AppTestForRangeLists(AppTestW_ListObject):
def setup_class(cls):
More information about the pypy-commit
mailing list