Kaydet (Commit) d87f22ce authored tarafından Mark Dickinson's avatar Mark Dickinson

Add better error reporting for MemoryErrors caused by str->float conversions.

üst 5afe42b6
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment