mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Forward port r70470 and r70473 for OrderedDict to use a doubly linked list.
This commit is contained in:
parent
6cf17aacbf
commit
dc879f033c
3 changed files with 44 additions and 17 deletions
|
@ -770,12 +770,19 @@ class TestOrderedDict(unittest.TestCase):
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue