changeset 44486:408a4eb41453

tests: avoid implicit bytes -> unicode -> bytes roundtrip on Python 2 Before the change, there were two implicit conversions: * The format string was converted to unicode because the substituted values were unicode. * When printing the message in log(), the string was converted from unicode to str.
author Manuel Jacob <me@manueljacob.de>
date Fri, 06 Mar 2020 10:27:38 +0100
parents 9db11679f8ac
children 69ae64637be5
files tests/run-tests.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Mar 08 16:40:39 2020 +0100
+++ b/tests/run-tests.py	Fri Mar 06 10:27:38 2020 +0100
@@ -1165,10 +1165,7 @@
         if self._keeptmpdir:
             log(
                 '\nKeeping testtmp dir: %s\nKeeping threadtmp dir: %s'
-                % (
-                    self._testtmp.decode('utf-8'),
-                    self._threadtmp.decode('utf-8'),
-                )
+                % (_bytes2sys(self._testtmp), _bytes2sys(self._threadtmp),)
             )
         else:
             try: