Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2dbf2a9

Browse files
committed
Add a more informative error message for test_float_parsing so the failing
locale can be known.
1 parent 1ac754f commit 2dbf2a9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/test/test__locale.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ def test_float_parsing(self):
105105
setlocale(LC_NUMERIC, loc)
106106
except Error:
107107
continue
108-
self.assertEquals(int(eval('3.14') * 100), 314)
109-
self.assertEquals(int(float('3.14') * 100), 314)
108+
self.assertEquals(int(eval('3.14') * 100), 314,
109+
"using eval('3.14') failed for %s" % loc)
110+
self.assertEquals(int(float('3.14') * 100), 314,
111+
"using float('3.14') failed for %s" % loc)
110112

111113

112114

0 commit comments

Comments
 (0)