aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug/testlib.py')
-rw-r--r--debug/testlib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 92e6ab6..60cb897 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -392,8 +392,10 @@ def parse_rhs(text):
elif ' = ' in text:
lhs, rhs = text.split(' = ', 1)
return {lhs: parse_rhs(rhs)}
- elif re.match(r"-?\d+\.\d+(e-?\d+)?", text):
+ elif re.match(r"-?(\d+\.\d+(e-?\d+)?|inf)", text):
return float(text)
+ elif re.match(r"-nan\(0x[a-f0-9]+\)", text):
+ return float("nan")
else:
return int(text, 0)