summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_math.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 699c621..d86298d 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -12,7 +12,11 @@ class MathTests(unittest.TestCase):
def ftest(self, name, value, expected):
if abs(value-expected) > eps:
- self.fail('%s returned %f, expected %f'%\
+ # Use %r instead of %f so the error message
+ # displays full precision. Otherwise discrepancies
+ # in the last few bits will lead to very confusing
+ # error messages
+ self.fail('%s returned %r, expected %r' %
(name, value, expected))
def testConstants(self):