diff --git a/tests/heredoctest.py b/tests/heredoctest.py --- a/tests/heredoctest.py +++ b/tests/heredoctest.py @@ -1,6 +1,9 @@ import doctest, tempfile, os, sys if __name__ == "__main__": + if 'TERM' in os.environ: + del os.environ['TERM'] + fd, name = tempfile.mkstemp(suffix='hg-tst') try: diff --git a/tests/test-url.py b/tests/test-url.py --- a/tests/test-url.py +++ b/tests/test-url.py @@ -1,4 +1,4 @@ -import sys +import os def check(a, b): if a != b: @@ -232,4 +232,7 @@ def test_url(): 'foo/bar/baz' """ +if 'TERM' in os.environ: + del os.environ['TERM'] + doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE)