Read about our upcoming Code of Conduct on this issue

Commit ba53e1a8 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

tests: prevent printing \r to stdout

Like we've done in other recent commits, we need to change
sys.stdout on Python 3 to not use os.linesep so output is
consistent on Python 3 on Windows.

With this change, test-notify.t now passes on Python 3 on Windows!

Differential Revision:
parent d359f0d1a3d3
$ cat > $TESTTMP/ <<EOF
> from __future__ import absolute_import, print_function
> import io
> import re
> import sys
> if sys.version_info[0] >= 3:
> sys.stdout = io.TextIOWrapper(
> sys.stdout.buffer,
> sys.stdout.encoding,
> sys.stdout.errors,
> newline="\n",
> line_buffering=sys.stdout.line_buffering,
> )
> print(re.sub("\n[ \t]", " ",, end="")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment