Mercurial > public > mercurial-scm > hg
comparison tests/test-run-tests.py @ 28917:f798ffe7cb08
tests: make test-run-tests use absolute_import
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 14 Apr 2016 01:03:24 +0530 |
parents | 625dd917f04f |
children | eeed23508383 |
comparison
equal
deleted
inserted
replaced
28916:3b453513f1fe | 28917:f798ffe7cb08 |
---|---|
1 """test line matching with some failing examples and some which warn | 1 """test line matching with some failing examples and some which warn |
2 | 2 |
3 run-test.t only checks positive matches and can not see warnings | 3 run-test.t only checks positive matches and can not see warnings |
4 (both by design) | 4 (both by design) |
5 """ | 5 """ |
6 from __future__ import print_function | 6 from __future__ import absolute_import, print_function |
7 | 7 |
8 import os, re | 8 import doctest |
9 import os | |
10 import re | |
9 # this is hack to make sure no escape characters are inserted into the output | 11 # this is hack to make sure no escape characters are inserted into the output |
10 if 'TERM' in os.environ: | 12 if 'TERM' in os.environ: |
11 del os.environ['TERM'] | 13 del os.environ['TERM'] |
12 import doctest | |
13 run_tests = __import__('run-tests') | 14 run_tests = __import__('run-tests') |
14 | 15 |
15 def prn(ex): | 16 def prn(ex): |
16 m = ex.args[0] | 17 m = ex.args[0] |
17 if isinstance(m, str): | 18 if isinstance(m, str): |