Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r60102:c7d2ff404236
Date: 2013-01-15 12:28 -0800
http://bitbucket.org/pypy/pypy/changeset/c7d2ff404236/

Log:    workaround our 3.4 length_hint behavior

diff --git a/lib-python/3.2/test/test_itertools.py 
b/lib-python/3.2/test/test_itertools.py
--- a/lib-python/3.2/test/test_itertools.py
+++ b/lib-python/3.2/test/test_itertools.py
@@ -1398,7 +1398,11 @@
     def test_repeat(self):
         from test.test_iterlen import len
         self.assertEqual(len(repeat(None, 50)), 50)
-        self.assertRaises(TypeError, len, repeat(None))
+        if support.check_impl_detail(pypy=True):
+            # 3.4 behavior
+            self.assertEqual(len(repeat(None)), NotImplemented)
+        else:
+            self.assertRaises(TypeError, len, repeat(None))
 
 class RegressionTests(unittest.TestCase):
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to