From: Victor Stinner Date: Sat, 19 Mar 2016 09:00:08 +0000 (+0100) Subject: Try again to fix test_warnings on Windows X-Git-Tag: v3.6.0a1~433 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=74879e41791c9c033597250476d556815921a8e3;p=thirdparty%2FPython%2Fcpython.git Try again to fix test_warnings on Windows Issue #26567: normalize newlines in test_tracemalloc. --- diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py index be80b05402ad..e6f47cda4c3d 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 <...>