From 0c937b3ed6d2eeca84fa4aca1a9aef685db65abc Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 22 Jul 2014 12:14:52 +0300 Subject: Issue #22031: Reprs now always use hexadecimal format with the "0x" prefix when contain an id in form " at 0x...". --- Lib/test/test_weakref.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Lib/test/test_weakref.py') diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py index cccb5152527..adb923f2a38 100644 --- a/Lib/test/test_weakref.py +++ b/Lib/test/test_weakref.py @@ -1536,6 +1536,14 @@ class MappingTestCase(TestBase): self.assertEqual(len(d), 0) self.assertEqual(count, 2) + def test_make_weak_valued_dict_repr(self): + dict = weakref.WeakValueDictionary() + self.assertRegex(repr(dict), '') + + def test_make_weak_keyed_dict_repr(self): + dict = weakref.WeakKeyDictionary() + self.assertRegex(repr(dict), '') + from test import mapping_tests class WeakValueDictionaryTestCase(mapping_tests.BasicTestMappingProtocol): -- cgit v1.2.3