Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(306)

Unified Diff: Lib/test/test__locale.py

Issue 3232042: #9424: convert deprecated assert methods in the Python test suite Base URL: http://svn.python.org/projects/python/branches/py3k/
Patch Set: Minor cleanups Created 13 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/string_tests.py ('k') | Lib/test/test_argparse.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Lib/test/test__locale.py
===================================================================
--- Lib/test/test__locale.py (revision 86567)
+++ Lib/test/test__locale.py (working copy)
@@ -59,7 +59,7 @@
known_value = known_numerics.get(used_locale,
('', ''))[data_type == 'thousands_sep']
if known_value and calc_value:
- self.assertEquals(calc_value, known_value,
+ self.assertEqual(calc_value, known_value,
self.lc_numeric_err_msg % (
calc_value, known_value,
calc_type, data_type, set_locale,
@@ -107,7 +107,7 @@
set_locale = setlocale(LC_NUMERIC)
except Error:
set_locale = "<not able to determine>"
- self.assertEquals(nl_radixchar, li_radixchar,
+ self.assertEqual(nl_radixchar, li_radixchar,
"%s (nl_langinfo) != %s (localeconv) "
"(set to %s, using %s)" % (
nl_radixchar, li_radixchar,
@@ -127,9 +127,9 @@
if loc == 'eu_ES' and localeconv()['decimal_point'] == "' ":
continue
- self.assertEquals(int(eval('3.14') * 100), 314,
+ self.assertEqual(int(eval('3.14') * 100), 314,
"using eval('3.14') failed for %s" % loc)
- self.assertEquals(int(float('3.14') * 100), 314,
+ self.assertEqual(int(float('3.14') * 100), 314,
"using float('3.14') failed for %s" % loc)
if localeconv()['decimal_point'] != '.':
self.assertRaises(ValueError, float,
« no previous file with comments | « Lib/test/string_tests.py ('k') | Lib/test/test_argparse.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b