# HG changeset patch # User Manuel Jacob # Date 2020-03-06 09:27:38 # 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 --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1165,10 +1165,7 @@ class Test(unittest.TestCase): 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: