diff options
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r-- | Lib/test/test_collections.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 514dc39..51e93e4 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -994,6 +994,12 @@ class TestOrderedDict(unittest.TestCase): with self.assertRaises(KeyError): od.move_to_end('x') + def test_sizeof(self): + # Wimpy test: Just verify the reported size is larger than a regular dict + d = dict(a=1) + od = OrderedDict(**d) + self.assertGreater(sys.getsizeof(od), sys.getsizeof(d)) + class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol): type2test = OrderedDict |