From d1719756098b282ad703b899ebcb57eeeb0167c2 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Mon, 1 Jun 2015 23:12:13 -0600 Subject: Issue #24348: Drop superfluous increfs/decrefs. --- Lib/test/test_collections.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Lib/test/test_collections.py') diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 931ac0ff0f..097aa9afea 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -2055,6 +2055,18 @@ class CPythonOrderedDictTests(OrderedDictTests, unittest.TestCase): with self.assertRaises(KeyError): od.copy() + def test_issue24348(self): + OrderedDict = self.module.OrderedDict + + class Key: + def __hash__(self): + return 1 + + od = OrderedDict() + od[Key()] = 0 + # This should not crash. + od.popitem() + class PurePythonGeneralMappingTests(mapping_tests.BasicTestMappingProtocol): -- cgit v1.2.1