Patchwork D3515: tests: port test-ui-verbosity.py to Python 3

login
register
mail settings
Submitter phabricator
Date May 8, 2018, 8:46 p.m.
Message ID <differential-rev-PHID-DREV-2bjonb53xrnzg2stzf3v-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/31421/
State Superseded
Headers show

Comments

phabricator - May 8, 2018, 8:46 p.m.
durin42 created this revision.
Herald added a reviewer: pulkit.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame just some bytes/string wrangling

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3515

AFFECTED FILES
  contrib/python3-whitelist
  tests/test-ui-verbosity.py

CHANGE DETAILS




To: durin42, pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-ui-verbosity.py b/tests/test-ui-verbosity.py
--- a/tests/test-ui-verbosity.py
+++ b/tests/test-ui-verbosity.py
@@ -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:
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -452,6 +452,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