# HG changeset patch # User Manuel Jacob # Date 1583486858 -3600 # Node ID 408a4eb4145304ba2bda9546a59ef8979b3459ab # Parent 9db11679f8acb7f68d4b59832109c204db1c44fb 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. diff -r 9db11679f8ac -r 408a4eb41453 tests/run-tests.py --- 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: