Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r61875:f9424c217f7d
Date: 2013-02-27 21:06 -0800
http://bitbucket.org/pypy/pypy/changeset/f9424c217f7d/
Log: reapply probably the last couple of check_impl_detail workarounds
from 2.7
diff --git a/lib-python/3.2/test/test_isinstance.py
b/lib-python/3.2/test/test_isinstance.py
--- a/lib-python/3.2/test/test_isinstance.py
+++ b/lib-python/3.2/test/test_isinstance.py
@@ -272,7 +272,15 @@
# 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)
diff --git a/lib-python/3.2/test/test_unicodedata.py
b/lib-python/3.2/test/test_unicodedata.py
--- a/lib-python/3.2/test/test_unicodedata.py
+++ b/lib-python/3.2/test/test_unicodedata.py
@@ -234,10 +234,11 @@
# 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):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit