diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py index b5a630edaf3..a838b043f25 100644 --- a/Lib/test/test_strtod.py +++ b/Lib/test/test_strtod.py @@ -91,6 +91,8 @@ class StrtodTests(unittest.TestCase): fs = float(s) except OverflowError: got = '-inf' if s[0] == '-' else 'inf' + except MemoryError: + got = 'memory error' else: got = fs.hex() expected = strtod(s)