tests/test-ui-color.py
changeset 37925 b8c2004a8d2b
parent 36337 0f36926b2651
child 37942 32bc3815efae
--- a/tests/test-ui-color.py	Fri Apr 27 11:57:15 2018 -0400
+++ b/tests/test-ui-color.py	Fri Apr 27 11:59:21 2018 -0400
@@ -5,6 +5,9 @@
     dispatch,
     ui as uimod,
 )
+from mercurial.utils import (
+    stringutil,
+)
 
 # ensure errors aren't buffered
 testui = uimod.ui()
@@ -12,7 +15,7 @@
 testui.write((b'buffered\n'))
 testui.warn((b'warning\n'))
 testui.write_err(b'error\n')
-print(repr(testui.popbuffer()))
+print(stringutil.pprint(testui.popbuffer()).decode('ascii'))
 
 # test dispatch.dispatch with the same ui object
 hgrc = open(os.environ["HGRCPATH"], 'wb')
@@ -35,4 +38,3 @@
 print("colored? %s" % (ui_._colormode is not None))
 runcmd()
 print("colored? %s" % (ui_._colormode is not None))
-