Author: Armin Rigo <[email protected]>
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):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to