Submitter | phabricator |
---|---|
Date | April 1, 2020, 7:09 p.m. |
Message ID | <b11b9fa4b94eec34f0877f1c85c84c90@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/45980/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/tests/filtertraceback.py b/tests/filtertraceback.py --- a/tests/filtertraceback.py +++ b/tests/filtertraceback.py @@ -4,8 +4,19 @@ from __future__ import absolute_import, print_function +import io import sys +if sys.version_info[0] >= 3: + # Prevent \r from being inserted on Windows. + sys.stdout = io.TextIOWrapper( + sys.stdout.buffer, + sys.stdout.encoding, + sys.stdout.errors, + newline="\n", + line_buffering=sys.stdout.line_buffering, + ) + state = 'none' for line in sys.stdin: