[pypy-commit] pypy py3k: PyPy doesn't mask the exception.
Manuel Jacob
noreply at buildbot.pypy.org
Thu Feb 21 01:22:33 CET 2013
Author: Manuel Jacob
Branch: py3k
Changeset: r61520:18dcd071de5c
Date: 2013-02-21 01:19 +0100
http://bitbucket.org/pypy/pypy/changeset/18dcd071de5c/
Log: PyPy doesn't mask the exception.
diff --git a/lib-python/3.2/test/pickletester.py b/lib-python/3.2/test/pickletester.py
--- a/lib-python/3.2/test/pickletester.py
+++ b/lib-python/3.2/test/pickletester.py
@@ -8,7 +8,7 @@
from test.support import (
TestFailed, TESTFN, run_with_locale,
- _2G, _4G, bigmemtest, impl_detail
+ _2G, _4G, bigmemtest, impl_detail, check_impl_detail
)
from pickle import bytes_types
@@ -1039,9 +1039,14 @@
x = BadGetattr()
for proto in 0, 1:
self.assertRaises(RuntimeError, self.dumps, x, proto)
- # protocol 2 don't raise a RuntimeError.
- d = self.dumps(x, 2)
- self.assertRaises(RuntimeError, self.loads, d)
+ if check_impl_detail(cpython=True):
+ # protocol 2 don't raise a RuntimeError.
+ d = self.dumps(x, 2)
+ self.assertRaises(RuntimeError, self.loads, d)
+ else:
+ # PyPy doesn't mask the exception
+ for proto in 2, 3:
+ self.assertRaises(RuntimeError, self.dumps, x, proto)
def test_reduce_bad_iterator(self):
# Issue4176: crash when 4th and 5th items of __reduce__()
More information about the pypy-commit
mailing list