# HG changeset patch # User Pierre-Yves David # Date 2021-01-25 23:45:40 # Node ID 2bd77a6d3c2b1b171aff0c4cb45f33eb38cc190e # Parent 40914ec4bc0519e111b4b7e8695024a56641b5bd 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)