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.
--- 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: