diff options
author | John R. Lenton <jlenton@gmail.com> | 2014-01-06 20:08:52 +0000 |
---|---|---|
committer | John R. Lenton <jlenton@gmail.com> | 2014-01-07 22:51:08 +0000 |
commit | f77dce8a5dda13c759faeabb892d5f439dc05fd5 (patch) | |
tree | f7b570356d8620c95813a6c067363f7c0e058660 /tests | |
parent | 0fcbaa442f538c8ffca8a7387f7dc6d280172a5c (diff) | |
download | micropython-f77dce8a5dda13c759faeabb892d5f439dc05fd5.tar.gz micropython-f77dce8a5dda13c759faeabb892d5f439dc05fd5.zip |
Added dict.popitem
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basics/tests/dict_popitem.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/basics/tests/dict_popitem.py b/tests/basics/tests/dict_popitem.py new file mode 100644 index 0000000000..184735cde6 --- /dev/null +++ b/tests/basics/tests/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") |