Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r87857:17255e31217c
Date: 2016-10-18 11:09 +0200
http://bitbucket.org/pypy/pypy/changeset/17255e31217c/
Log: This dict.update() call can raise RuntimeError or not, even on
CPython. On PyPy it will not. Change the test to check that it never
crashes, but may or may not raise RuntimeError.
diff --git a/lib-python/3/test/test_dict.py b/lib-python/3/test/test_dict.py
--- a/lib-python/3/test/test_dict.py
+++ b/lib-python/3/test/test_dict.py
@@ -951,7 +951,12 @@
other = dict(l)
other[X()] = 0
d = {X(): 0, 1: 1}
- self.assertRaises(RuntimeError, d.update, other)
+ # should not crash, but can raise RuntimeError (CPython)
+ # or not (PyPy)
+ try:
+ d.update(other)
+ except RuntimeError:
+ pass
from test import mapping_tests
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit