summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/dict_popitem.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/dict_popitem.py')
-rw-r--r--tests/basics/dict_popitem.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/basics/dict_popitem.py b/tests/basics/dict_popitem.py
new file mode 100644
index 0000000000..184735cde6
--- /dev/null
+++ b/tests/basics/dict_popitem.py
@@ -0,0 +1,11 @@
+d={1:2,3:4}
+print(d.popitem())
+print(d)
+print(d.popitem())
+print(d)
+try:
+ print(d.popitem(), "!!!",)
+except KeyError:
+ print("Raised KeyError")
+else:
+ print("Did not raise KeyError")