Mercurial > hg
diff tests/test-ui-color.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | 32bc3815efae |
children | 86e4daa2d54c |
line wrap: on
line diff
--- a/tests/test-ui-color.py Sat Oct 05 10:29:34 2019 -0400 +++ b/tests/test-ui-color.py Sun Oct 06 09:45:02 2019 -0400 @@ -5,15 +5,13 @@ dispatch, ui as uimod, ) -from mercurial.utils import ( - stringutil, -) +from mercurial.utils import stringutil # ensure errors aren't buffered testui = uimod.ui() testui.pushbuffer() -testui.write((b'buffered\n')) -testui.warn((b'warning\n')) +testui.write(b'buffered\n') +testui.warn(b'warning\n') testui.write_err(b'error\n') print(stringutil.pprint(testui.popbuffer(), bprefix=True).decode('ascii')) @@ -34,6 +32,7 @@ def runcmd(): dispatch.dispatch(dispatch.request([b'version', b'-q'], ui_)) + runcmd() print("colored? %s" % (ui_._colormode is not None)) runcmd()