summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/ieee754.txt16
-rw-r--r--Lib/test/test_math.py6
2 files changed, 11 insertions, 11 deletions
diff --git a/Lib/test/ieee754.txt b/Lib/test/ieee754.txt
index 5a41c8f..a07906c 100644
--- a/Lib/test/ieee754.txt
+++ b/Lib/test/ieee754.txt
@@ -127,31 +127,31 @@ Trigonometric Functions
>>> sin(INF)
Traceback (most recent call last):
...
-ValueError: math domain error
+ValueError: math domain error (invalid argument)
>>> sin(NINF)
Traceback (most recent call last):
...
-ValueError: math domain error
+ValueError: math domain error (invalid argument)
>>> sin(NAN)
nan
>>> cos(INF)
Traceback (most recent call last):
...
-ValueError: math domain error
+ValueError: math domain error (invalid argument)
>>> cos(NINF)
Traceback (most recent call last):
...
-ValueError: math domain error
+ValueError: math domain error (invalid argument)
>>> cos(NAN)
nan
>>> tan(INF)
Traceback (most recent call last):
...
-ValueError: math domain error
+ValueError: math domain error (invalid argument)
>>> tan(NINF)
Traceback (most recent call last):
...
-ValueError: math domain error
+ValueError: math domain error (invalid argument)
>>> tan(NAN)
nan
@@ -169,11 +169,11 @@ True
>>> asin(INF), asin(NINF)
Traceback (most recent call last):
...
-ValueError: math domain error
+ValueError: math domain error (invalid argument)
>>> acos(INF), acos(NINF)
Traceback (most recent call last):
...
-ValueError: math domain error
+ValueError: math domain error (invalid argument)
>>> equal(atan(INF), PI/2), equal(atan(NINF), -PI/2)
(True, True)
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index da8a0e9..379ff89 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -741,9 +741,9 @@ class MathTests(unittest.TestCase):
func = getattr(math, fn)
try:
result = func(ar)
- except ValueError:
- message = ("Unexpected ValueError in " +
- "test %s:%s(%r)\n" % (id, fn, ar))
+ except ValueError as exc:
+ message = (("Unexpected ValueError: %s\n " +
+ "in test %s:%s(%r)\n") % (exc.args[0], id, fn, ar))
self.fail(message)
self.ftest("%s:%s(%r)" % (id, fn, ar), result, er)