Mercurial > hg
comparison tests/run-tests.py @ 39706:030d558c6456
py3: add a missing b'' for Windows
I tried ./contrib/byteify-strings.py, but there were way too many changes (and
most looked wrong). This was hit with test-check-interfaces.py.
# skip-blame for b'' prefixes
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 18 Sep 2018 22:40:03 -0400 |
parents | b6fa1f628bbe |
children | 491fc3f4be67 |
comparison
equal
deleted
inserted
replaced
39705:fa681452b249 | 39706:030d558c6456 |
---|---|
1151 if ret == 0: | 1151 if ret == 0: |
1152 ret = signal.SIGTERM << 8 | 1152 ret = signal.SIGTERM << 8 |
1153 killdaemons(env['DAEMON_PIDS']) | 1153 killdaemons(env['DAEMON_PIDS']) |
1154 return ret | 1154 return ret |
1155 | 1155 |
1156 output = '' | 1156 output = b'' |
1157 proc.tochild.close() | 1157 proc.tochild.close() |
1158 | 1158 |
1159 try: | 1159 try: |
1160 output = proc.fromchild.read() | 1160 output = proc.fromchild.read() |
1161 except KeyboardInterrupt: | 1161 except KeyboardInterrupt: |
1175 | 1175 |
1176 for s, r in self._getreplacements(): | 1176 for s, r in self._getreplacements(): |
1177 output = re.sub(s, r, output) | 1177 output = re.sub(s, r, output) |
1178 | 1178 |
1179 if normalizenewlines: | 1179 if normalizenewlines: |
1180 output = output.replace('\r\n', '\n') | 1180 output = output.replace(b'\r\n', b'\n') |
1181 | 1181 |
1182 return ret, output.splitlines(True) | 1182 return ret, output.splitlines(True) |
1183 | 1183 |
1184 class PythonTest(Test): | 1184 class PythonTest(Test): |
1185 """A Python-based test.""" | 1185 """A Python-based test.""" |