changeset 37927:76d0a343c305

tests: port test-ui-verbosity.py to Python 3 # skip-blame just some bytes/string wrangling Differential Revision: https://phab.mercurial-scm.org/D3515
author Augie Fackler <augie@google.com>
date Fri, 27 Apr 2018 13:09:19 -0400
parents fb6226c15e54
children 7cd1e1adc471
files contrib/python3-whitelist tests/test-ui-verbosity.py
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Fri Apr 27 12:07:32 2018 -0400
+++ b/contrib/python3-whitelist	Fri Apr 27 13:09:19 2018 -0400
@@ -451,6 +451,7 @@
 test-template-engine.t
 test-treemanifest.t
 test-ui-color.py
+test-ui-verbosity.py
 test-unamend.t
 test-uncommit.t
 test-unified-test.t
--- a/tests/test-ui-verbosity.py	Fri Apr 27 12:07:32 2018 -0400
+++ b/tests/test-ui-verbosity.py	Fri Apr 27 13:09:19 2018 -0400
@@ -38,9 +38,9 @@
 
     u = uimod.ui.load()
     if cmd_quiet or cmd_debug or cmd_verbose:
-        u.setconfig('ui', 'quiet', str(bool(cmd_quiet)))
-        u.setconfig('ui', 'verbose', str(bool(cmd_verbose)))
-        u.setconfig('ui', 'debug', str(bool(cmd_debug)))
+        u.setconfig(b'ui', b'quiet', pycompat.bytestr(bool(cmd_quiet)))
+        u.setconfig(b'ui', b'verbose', pycompat.bytestr(bool(cmd_verbose)))
+        u.setconfig(b'ui', b'debug', pycompat.bytestr(bool(cmd_debug)))
 
     check = ''
     if u.debugflag: