[Python-checkins] cpython: Try again to fix test_warnings on Windows
victor.stinner
python-checkins at python.org
Sat Mar 19 05:01:04 EDT 2016
https://hg.python.org/cpython/rev/543639cdfdb9
changeset: 100604:543639cdfdb9
user: Victor Stinner <victor.stinner at gmail.com>
date: Sat Mar 19 10:00:08 2016 +0100
summary:
Try again to fix test_warnings on Windows
Issue #26567: normalize newlines in test_tracemalloc.
files:
Lib/test/test_warnings/__init__.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py
--- a/Lib/test/test_warnings/__init__.py
+++ b/Lib/test/test_warnings/__init__.py
@@ -788,6 +788,8 @@
res = assert_python_ok('-Wd', '-X', 'tracemalloc=2', support.TESTFN)
stderr = res.err.decode('ascii', 'replace')
+ # normalize newlines
+ stderr = '\n'.join(stderr.splitlines())
stderr = re.sub('<.*>', '<...>', stderr)
expected = textwrap.dedent('''
{fname}:5: ResourceWarning: unclosed file <...>
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list