[pypy-commit] pypy py3.3: Apply previous hacks to pickletester.
amauryfa
noreply at buildbot.pypy.org
Sat Apr 12 21:24:26 CEST 2014
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.3
Changeset: r70607:df6a6f8c4d40
Date: 2014-04-12 18:47 +0200
http://bitbucket.org/pypy/pypy/changeset/df6a6f8c4d40/
Log: Apply previous hacks to pickletester.
diff --git a/lib-python/3/test/pickletester.py b/lib-python/3/test/pickletester.py
--- a/lib-python/3/test/pickletester.py
+++ b/lib-python/3/test/pickletester.py
@@ -1157,8 +1157,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)
+ 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