Try again to fix test_warnings on Windows

Issue #26567: normalize newlines in test_tracemalloc.
This commit is contained in:
Victor Stinner 2016-03-19 10:00:08 +01:00
parent cf934a1c9b
commit 74879e4179

View file

@ -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 <...>