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

timeless timeless at fmr.im
Wed May 11 01:23:23 EDT 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1459820158 0
#      Tue Apr 05 01:35:58 2016 +0000
# Node ID e3cd6b9a9dff64a497650ac81588091bca0b52a6
# Parent  9cd2f021a0de791a9b58d820271553814c76ab18
# EXP-Topic runtests
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r e3cd6b9a9dff
run-tests: add support for RTUNICODEPEDANTRY environment variable

based on 73e4a02e6d23

diff -r 9cd2f021a0de -r e3cd6b9a9dff 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
+
 osenvironb = getattr(os, 'environb', os.environ)
 processlock = threading.Lock()
 


More information about the Mercurial-devel mailing list