[PATCH v3] run-tests: also color the summary messages (skipped, failed...)
Matthieu Laneuville
mlaneuville at gmail.com
Wed Jul 19 05:01:34 UTC 2017
That was indeed a Pygments-2.2.0 addition, I'm sending an updated patch
with color defined.
Le mer. 19 juil. 2017 à 01:08, Martin von Zweigbergk <martinvonz at google.com>
a écrit :
> On Tue, Jul 18, 2017 at 8:36 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> > On Tue, 18 Jul 2017 07:33:50 +0900, mlaneuville at gmail.com wrote:
> >> # HG changeset patch
> >> # User Matthieu Laneuville <matthieu.laneuville at octobus.net>
> >> # Date 1500330427 -32400
> >> # Tue Jul 18 07:27:07 2017 +0900
> >> # Node ID 14c07f0460918fe57b1c2709fe3ea3f071a95659
> >> # Parent 7f5f97697162331b5acf78aef091ae3fd341e308
> >> run-tests: also color the summary messages (skipped, failed...)
> >>
> >> diff -r 7f5f97697162 -r 14c07f046091 tests/run-tests.py
> >> --- a/tests/run-tests.py Tue Jul 18 07:19:26 2017 +0900
> >> +++ b/tests/run-tests.py Tue Jul 18 07:27:07 2017 +0900
> >> @@ -95,12 +95,46 @@
> >> try: # is pygments installed
> >> import pygments
> >> import pygments.lexers as lexers
> >> + import pygments.lexer as lexer
> >> import pygments.formatters as formatters
> >> + import pygments.token as token
> >> + import pygments.style as style
> >> with_color = True
> >> pygmentspresent = True
> >> except ImportError:
> >> pass
> >>
> >> +if pygmentspresent:
> >> + class TestRunnerStyle(style.Style):
> >> + default_style = ""
> >> + skipped = token.string_to_tokentype("Token.Generic.Skipped")
> >> + failed = token.string_to_tokentype("Token.Generic.Failed")
> >> + error = token.string_to_tokentype("Token.Generic.Error")
> >> + skippedname = token.string_to_tokentype("Token.Generic.SName")
> >> + failedname = token.string_to_tokentype("Token.Generic.FName")
> >> + styles = {
> >> + skipped: '#ansilightgray',
> >> + skippedname: '#ansidarkgray',
> >> + failed: '#ansidarkred',
> >> + failedname: '#ansired',
> >> + }
> >
> > Ugh, the buildbot failing.
> >
> >
> https://buildbot.mercurial-scm.org/builders/hg%20tests/builds/1100/steps/run-tests.py%20%28python%202.7.10%29/logs/stdio
> >
> > Does this require newer Pygments?
>
> It's failing the same way for me. I'll drop the patch.
>
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel at mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170719/7b5aa819/attachment-0002.html>
More information about the Mercurial-devel
mailing list