Author: Armin Rigo <[email protected]>
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()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit