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

Yuya Nishihara yuya at tcha.org
Fri May 20 14:06:45 UTC 2016


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.



More information about the Mercurial-devel mailing list