summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2006-01-19 07:09:09 (GMT)
committerBrett Cannon <bcannon@gmail.com>2006-01-19 07:09:09 (GMT)
commit2dbf2a98f4a7a3a6fd151be019795ff8831d27cc (patch)
tree1b077c60d8004e3912938b1f4af26c16f816cdf0
parent1ac754fa10f5d199d19911e21185d0970cb3073f (diff)
downloadcpython-2dbf2a98f4a7a3a6fd151be019795ff8831d27cc.zip
cpython-2dbf2a98f4a7a3a6fd151be019795ff8831d27cc.tar.gz
cpython-2dbf2a98f4a7a3a6fd151be019795ff8831d27cc.tar.bz2
Add a more informative error message for test_float_parsing so the failing
locale can be known.
-rw-r--r--Lib/test/test__locale.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test__locale.py b/Lib/test/test__locale.py
index abdb87e..8f2598f 100644
--- a/Lib/test/test__locale.py
+++ b/Lib/test/test__locale.py
@@ -105,8 +105,10 @@ class _LocaleTests(unittest.TestCase):
setlocale(LC_NUMERIC, loc)
except Error:
continue
- self.assertEquals(int(eval('3.14') * 100), 314)
- self.assertEquals(int(float('3.14') * 100), 314)
+ self.assertEquals(int(eval('3.14') * 100), 314,
+ "using eval('3.14') failed for %s" % loc)
+ self.assertEquals(int(float('3.14') * 100), 314,
+ "using float('3.14') failed for %s" % loc)