run-test: avoid byte issue when replacing output file of python test
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 26 Jan 2021 00:45:40 +0100
changeset 46456 7bb31c367847
parent 46455 374d7fff7cb5
child 46457 aaff3bc75306
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
tests/run-tests.py
--- 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)