Add a more informative error message for test_float_parsing so the failing

locale can be known.
This commit is contained in:
Brett Cannon 2006-01-19 07:09:09 +00:00
parent 1ac754fa10
commit 2dbf2a98f4
1 changed files with 4 additions and 2 deletions

View File

@ -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)