# HG changeset patch # User Simon Heimberg # Date 1389959189 -3600 # Node ID e1e6ddaef299b245851f36eb01ec7d74876a477e # Parent 2b96073f31382ae800b5726d23b4f62a11ad4dd0 tests: fix test-run-tests.py on OS X Do the same hack as in test-doctests.py to let the test pass on OS X. diff -r 2b96073f3138 -r e1e6ddaef299 tests/test-run-tests.py --- a/tests/test-run-tests.py Fri Jan 17 19:46:23 2014 +0100 +++ b/tests/test-run-tests.py Fri Jan 17 12:46:29 2014 +0100 @@ -4,8 +4,11 @@ (both by design) """ - -import doctest, os, re +import os, re +# this is hack to make sure no escape characters are inserted into the output +if 'TERM' in os.environ: + del os.environ['TERM'] +import doctest run_tests = __import__('run-tests') def lm(expected, output): @@ -54,7 +57,7 @@ restore os.altsep >>> os.altsep = _osaltsep """ - os.altsep # for pyflakes, because it does not see os in the doctest + pass def otherostests(): r"""test matching like running on non-windows os