* Add clearer comment to initialization code.
* Add optional argument to popitem() -- modeled
after Anthon van der Neut's C version.
* Fix method markup in docs.
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index f232df4..9e984ba 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -768,12 +768,19 @@
class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
type2test = OrderedDict
+ def test_popitem(self):
+ d = self._empty_mapping()
+ self.assertRaises(KeyError, d.popitem)
+
class MyOrderedDict(OrderedDict):
pass
class SubclassMappingTests(mapping_tests.BasicTestMappingProtocol):
type2test = MyOrderedDict
+ def test_popitem(self):
+ d = self._empty_mapping()
+ self.assertRaises(KeyError, d.popitem)
import doctest, collections