summaryrefslogtreecommitdiff
path: root/tests/regressiontests/datastructures/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regressiontests/datastructures/tests.py')
-rw-r--r--tests/regressiontests/datastructures/tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/datastructures/tests.py b/tests/regressiontests/datastructures/tests.py
index b58ee79693..d1e21e673c 100644
--- a/tests/regressiontests/datastructures/tests.py
+++ b/tests/regressiontests/datastructures/tests.py
@@ -54,6 +54,17 @@
True
>>> print repr(d)
{'one': 'not one', 'two': 'two', 'three': 'three'}
+>>> d.pop('one', 'missing')
+'not one'
+>>> d.pop('one', 'missing')
+'missing'
+
+We don't know which item will be popped in popitem(), so we'll just check that
+the number of keys has decreased.
+>>> l = len(d)
+>>> _ = d.popitem()
+>>> l - len(d)
+1
Init from sequence of tuples
>>> d = SortedDict((