From 74879e41791c9c033597250476d556815921a8e3 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 19 Mar 2016 10:00:08 +0100 Subject: Try again to fix test_warnings on Windows Issue #26567: normalize newlines in test_tracemalloc. --- Lib/test/test_warnings/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py index be80b05..e6f47cd 100644 --- a/Lib/test/test_warnings/__init__.py +++ b/Lib/test/test_warnings/__init__.py @@ -788,6 +788,8 @@ class PyWarningsDisplayTests(WarningsDisplayTests, unittest.TestCase): 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 <...> -- cgit v0.12