diff options
| author | Justin Bronn <jbronn@gmail.com> | 2007-10-26 20:47:20 +0000 |
|---|---|---|
| committer | Justin Bronn <jbronn@gmail.com> | 2007-10-26 20:47:20 +0000 |
| commit | 4ffbddf92d89c3b31cef90043721184a501cd454 (patch) | |
| tree | db8131d40b0a5437270a6b1e8d579113ab3508e8 /tests/regressiontests/datastructures/tests.py | |
| parent | f66ee9d0065838a0f6c9c76203a775a78446cdf7 (diff) | |
gis: Merged revisions 6525-6613 via svnmerge from [repos:django/trunk trunk].
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@6615 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/datastructures/tests.py')
| -rw-r--r-- | tests/regressiontests/datastructures/tests.py | 11 |
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(( |
