Patchwork D2359: py3: add b'' to test-ui-color.py

login
register
mail settings
Submitter phabricator
Date Feb. 21, 2018, 12:57 p.m.
Message ID <6306a3445712c7458e80caf1603f848f@localhost.localdomain>
Download mbox | patch
Permalink /patch/28182/
State Not Applicable
Headers show

Comments

phabricator - Feb. 21, 2018, 12:57 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG236596a67a54: py3: add b&#039;&#039; to test-ui-color.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2359?vs=5937&id=5940

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

AFFECTED FILES
  tests/test-ui-color.py

CHANGE DETAILS




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

Patch

diff --git a/tests/test-ui-color.py b/tests/test-ui-color.py
--- a/tests/test-ui-color.py
+++ b/tests/test-ui-color.py
@@ -9,27 +9,27 @@ 
 # ensure errors aren't buffered
 testui = uimod.ui()
 testui.pushbuffer()
-testui.write(('buffered\n'))
-testui.warn(('warning\n'))
-testui.write_err('error\n')
+testui.write((b'buffered\n'))
+testui.warn((b'warning\n'))
+testui.write_err(b'error\n')
 print(repr(testui.popbuffer()))
 
 # test dispatch.dispatch with the same ui object
 hgrc = open(os.environ["HGRCPATH"], 'w')
-hgrc.write('[extensions]\n')
-hgrc.write('color=\n')
+hgrc.write(b'[extensions]\n')
+hgrc.write(b'color=\n')
 hgrc.close()
 
 ui_ = uimod.ui.load()
-ui_.setconfig('ui', 'formatted', 'True')
+ui_.setconfig(b'ui', b'formatted', b'True')
 
 # we're not interested in the output, so write that to devnull
 ui_.fout = open(os.devnull, 'w')
 
 # call some arbitrary command just so we go through
 # color's wrapped _runcommand twice.
 def runcmd():
-    dispatch.dispatch(dispatch.request(['version', '-q'], ui_))
+    dispatch.dispatch(dispatch.request([b'version', b'-q'], ui_))
 
 runcmd()
 print("colored? %s" % (ui_._colormode is not None))