diff options
Diffstat (limited to 'Lib/test/test_dict.py')
-rw-r--r-- | Lib/test/test_dict.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py index b62237d9d6..f715657d36 100644 --- a/Lib/test/test_dict.py +++ b/Lib/test/test_dict.py @@ -544,6 +544,17 @@ class DictTest(unittest.TestCase): resizing = True d[9] = 6 + def test_empty_presized_dict_in_freelist(self): + # Bug #3537: if an empty but presized dict with a size larger + # than 7 was in the freelist, it triggered an assertion failure + try: + d = {'a': 1/0, 'b': None, 'c': None, 'd': None, 'e': None, + 'f': None, 'g': None, 'h': None} + except ZeroDivisionError: + pass + d = {} + + from test import mapping_tests |