1. Pypy
  2. Untitled project
  3. pypy

Commits

Philip Jenvey  committed f9424c2

reapply probably the last couple of check_impl_detail workarounds from 2.7

  • Participants
  • Parent commits 1007f01
  • Branches py3k

Comments (0)

Files changed (2)

File lib-python/3.2/test/test_isinstance.py

View file
     # Make sure that calling isinstance with a deeply nested tuple for its
     # argument will raise RuntimeError eventually.
     tuple_arg = (compare_to,)
-    for cnt in range(sys.getrecursionlimit()+5):
+
+    if support.check_impl_detail(cpython=True):
+        RECURSION_LIMIT = sys.getrecursionlimit()
+    else:
+        # on non-CPython implementations, the maximum actual recursion
+        # limit might be higher, but probably not higher than 99999
+        RECURSION_LIMIT = 99999
+
+    for cnt in range(RECURSION_LIMIT + 5):
         tuple_arg = (tuple_arg,)
         fxn(arg, tuple_arg)
 

File lib-python/3.2/test/test_unicodedata.py

View file
         # been loaded in this process.
         popen = subprocess.Popen(args, stderr=subprocess.PIPE)
         popen.wait()
-        self.assertEqual(popen.returncode, 1)
-        error = "SyntaxError: (unicode error) \\N escapes not supported " \
-            "(can't load unicodedata module)"
-        self.assertIn(error, popen.stderr.read().decode("ascii"))
+        self.assertIn(popen.returncode, [0, 1]) # at least it did not segfault
+        if test.support.check_impl_detail():
+            error = "SyntaxError: (unicode error) \\N escapes not supported " \
+                "(can't load unicodedata module)"
+            self.assertIn(error, popen.stderr.read().decode("ascii"))
         popen.stderr.close()
 
     def test_decimal_numeric_consistent(self):