test_locale now ignores the DeprecationWarning (#977)

Don't fail anymore if test run with python3 -Werror.

Fix also deprecation message: add a space.
This commit is contained in:
Victor Stinner 2017-04-03 18:09:55 +02:00 committed by GitHub
parent 734125938d
commit 9acc6a03f1
2 changed files with 14 additions and 12 deletions

View file

@ -245,7 +245,7 @@ def format_string(f, val, grouping=False, monetary=False):
def format(percent, value, grouping=False, monetary=False, *additional):
"""Deprecated, use format_string instead."""
warnings.warn(
"This method will be removed in a future version of Python."
"This method will be removed in a future version of Python. "
"Use 'locale.format_string()' instead.",
DeprecationWarning, stacklevel=2
)