# HG changeset patch # User timeless # Date 2016-04-05 01:35:58 # Node ID 89822d7a9d5fbe0d99648fb09b716d164b67740a # Parent 9ac309946df9e69bb73ded75f2fc5b84a4e785c2 run-tests: add support for RTUNICODEPEDANTRY environment variable based on 73e4a02e6d23 diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -69,6 +69,13 @@ except ImportError: 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()