[PATCH 3 of 4 v2] run-tests: add support for RTUNICODEPEDANTRY environment variable

Augie Fackler raf at durin42.com
Mon May 23 15:18:57 EDT 2016


On Fri, May 20, 2016 at 02:43:36PM -0500, Sean Farley wrote:
>
> Yuya Nishihara <yuya at tcha.org> writes:
>
> > On Wed, 11 May 2016 17:51:26 +0000, timeless wrote:
> >> # HG changeset patch
> >> # User timeless <timeless at mozdev.org>
> >> # Date 1459820158 0
> >> #      Tue Apr 05 01:35:58 2016 +0000
> >> # Node ID ac615a1325bf2d0a2d8c87ae32e755c5d6f56e52
> >> # Parent  ed9fa9c2af2c37a9273d1f20c96f4acb45733fe6
> >> # EXP-Topic runtests
> >> # Available At bb://timeless/mercurial-crew
> >> #              hg pull bb://timeless/mercurial-crew -r ac615a1325bf
> >> run-tests: add support for RTUNICODEPEDANTRY environment variable
> >>
> >> based on 73e4a02e6d23
> >>
> >> diff -r ed9fa9c2af2c -r ac615a1325bf tests/run-tests.py
> >> --- a/tests/run-tests.py	Tue May 10 22:52:26 2016 +0000
> >> +++ b/tests/run-tests.py	Tue Apr 05 01:35:58 2016 +0000
> >> @@ -69,6 +69,13 @@
> >>  from xml.dom import minidom
> >>  import unittest
> >>
> >> +if os.environ.get('RTUNICODEPEDANTRY', False):
> >> +    try:
> >> +        reload(sys)
> >> +        sys.setdefaultencoding("undefined")
> >> +    except NameError:
> >> +        pass
> >
> > The code looks good, but "RT" sounds a bit odd to me. I wanna ask someone
> > to decide to take this or not.
>
> Yeah, I agree that RT sounds odd to me, too.

I'm guessing here, but I suspect the reason is to allow testing
unicode pedant mode on run-tests without having that matter for the hg
under test. timeless, is that right?

Note that I'd be a bigger fan of just always running run-tests in
unicode pedant mode. Is that not possible for some reason?

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list