# HG changeset patch # User Pierre-Yves David # Date 2021-01-25 23:45:40 # Node ID 7bb31c367847f1f1e1331b91633cee4a31025c1a # Parent 374d7fff7cb5dc0e291e59d469aeb1c5f24a7639 run-test: avoid byte issue when replacing output file of python test Otherwise we get error like:: FileNotFoundError: [Errno 2] No such file or directory: "b'…/tests/test-minirst.py'.out" Differential Revision: https://phab.mercurial-scm.org/D9868 diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -2278,7 +2278,7 @@ class TestResult(unittest._TextTestResul if test.path.endswith(b'.t'): rename(test.errpath, test.path) else: - rename(test.errpath, '%s.out' % test.path) + rename(test.errpath, b'%s.out' % test.path) accepted = True if not accepted: self.faildata[test.name] = b''.join(lines)