[pypy-commit] pypy all_ordered_dicts: Add another test

arigo noreply at buildbot.pypy.org
Tue Jan 13 19:03:22 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: all_ordered_dicts
Changeset: r75319:09d278245a93
Date: 2015-01-13 19:03 +0100
http://bitbucket.org/pypy/pypy/changeset/09d278245a93/

Log:	Add another test

diff --git a/pypy/objspace/std/test/test_dictmultiobject.py b/pypy/objspace/std/test/test_dictmultiobject.py
--- a/pypy/objspace/std/test/test_dictmultiobject.py
+++ b/pypy/objspace/std/test/test_dictmultiobject.py
@@ -260,6 +260,15 @@
             assert list(__pypy__.reversed_dict(d)) == d.keys()[::-1]
         raises(TypeError, __pypy__.reversed_dict, 42)
 
+    def test_reversed_dict_runtimeerror(self):
+        import __pypy__
+        d = {1: 2, 3: 4, 5: 6}
+        it = __pypy__.reversed_dict(d)
+        key = it.next()
+        assert key in [1, 3, 5]
+        del d[key]
+        raises(RuntimeError, it.next)
+
     def test_keys(self):
         d = {1: 2, 3: 4}
         kys = d.keys()


More information about the pypy-commit mailing list