#5656: detect correct encoding of files when reporting coverage in trace.py, and ignore files in the temporary directory when reporting.

This commit is contained in:
Georg Brandl 2009-04-01 23:07:29 +00:00
parent cde68cfc14
commit 33c2881b63
3 changed files with 23 additions and 11 deletions

View file

@ -404,8 +404,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
print("Using random seed", random_seed)
random.shuffle(tests)
if trace:
import trace
tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix],
import trace, tempfile
tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,
tempfile.gettempdir()],
trace=False, count=True)
test_times = []
support.verbose = verbose # Tell tests to be moderately quiet