mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Fix the damage to UserDict and its tests.
Clearly this is not the right way to fix this; UserDict and MixinDict ought to be redesigned with the new dict API in mind. But I'm not claiming to be in charge of library redesign, I only want zero failing tests.
This commit is contained in:
parent
e34cdd1bc1
commit
d81206d152
3 changed files with 17 additions and 18 deletions
|
@ -317,7 +317,7 @@ class TestMappingProtocol(BasicTestMappingProtocol):
|
|||
def test_keys(self):
|
||||
BasicTestMappingProtocol.test_keys(self)
|
||||
d = self._empty_mapping()
|
||||
self.assertEqual(d.keys(), [])
|
||||
self.assertEqual(list(d.keys()), [])
|
||||
d = self._full_mapping({'a': 1, 'b': 2})
|
||||
k = d.keys()
|
||||
self.assert_('a' in k)
|
||||
|
@ -327,13 +327,13 @@ class TestMappingProtocol(BasicTestMappingProtocol):
|
|||
def test_values(self):
|
||||
BasicTestMappingProtocol.test_values(self)
|
||||
d = self._full_mapping({1:2})
|
||||
self.assertEqual(d.values(), [2])
|
||||
self.assertEqual(list(d.values()), [2])
|
||||
|
||||
def test_items(self):
|
||||
BasicTestMappingProtocol.test_items(self)
|
||||
|
||||
d = self._full_mapping({1:2})
|
||||
self.assertEqual(d.items(), [(1, 2)])
|
||||
self.assertEqual(list(d.items()), [(1, 2)])
|
||||
|
||||
def test_contains(self):
|
||||
d = self._empty_mapping()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue