comparison tests/test-notify.t @ 48944:fe3303436b79

tests: remove Python 2 support code Differential Revision: https://phab.mercurial-scm.org/D12350
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 12:46:27 -0700
parents 42d2b31cee0b
children 950c39918bd2
comparison
equal deleted inserted replaced
48943:70df51a2c2ce 48944:fe3303436b79
1 $ cat > $TESTTMP/filter.py <<EOF 1 $ cat > $TESTTMP/filter.py <<EOF
2 > import io 2 > import io
3 > import re 3 > import re
4 > import sys 4 > import sys
5 > if sys.version_info[0] >= 3: 5 > sys.stdout = io.TextIOWrapper(
6 > sys.stdout = io.TextIOWrapper( 6 > sys.stdout.buffer,
7 > sys.stdout.buffer, 7 > sys.stdout.encoding,
8 > sys.stdout.encoding, 8 > sys.stdout.errors,
9 > sys.stdout.errors, 9 > newline="\n",
10 > newline="\n", 10 > line_buffering=sys.stdout.line_buffering,
11 > line_buffering=sys.stdout.line_buffering, 11 > )
12 > )
13 > print(re.sub("\n[ \t]", " ", sys.stdin.read()), end="") 12 > print(re.sub("\n[ \t]", " ", sys.stdin.read()), end="")
14 > EOF 13 > EOF
15 14
16 $ cat <<EOF >> $HGRCPATH 15 $ cat <<EOF >> $HGRCPATH
17 > [experimental] 16 > [experimental]