changeset 46456:7bb31c367847

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 26 Jan 2021 00:45:40 +0100
parents 374d7fff7cb5
children aaff3bc75306
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Mon Jan 25 16:34:43 2021 +0100
+++ b/tests/run-tests.py	Tue Jan 26 00:45:40 2021 +0100
@@ -2278,7 +2278,7 @@
                         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)