diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py index 1883820ca5f..189254260cd 100644 --- a/Lib/test/test_strtod.py +++ b/Lib/test/test_strtod.py @@ -91,6 +91,8 @@ def check_strtod(self, s): fs = float(s) except OverflowError: got = '-inf' if s[0] == '-' else 'inf' + except MemoryError: + got = 'memory error' else: got = fs.hex() expected = strtod(s)