summaryrefslogtreecommitdiff
path: root/igor.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-08-09 08:30:15 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-08-09 08:30:15 -0400
commit15945f2408efaf164a3a78f67ef74a74d557fa82 (patch)
tree527c852b96d3911393e12e8a4dbd716bb1204437 /igor.py
parent5a4f125853b5056f98d80162687b6d1eace38ea1 (diff)
downloadpython-coveragepy-git-15945f2408efaf164a3a78f67ef74a74d557fa82.tar.gz
test: show contexts in metacov report
Diffstat (limited to 'igor.py')
-rw-r--r--igor.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/igor.py b/igor.py
index e6b3c313..0ea93e40 100644
--- a/igor.py
+++ b/igor.py
@@ -135,6 +135,9 @@ def run_tests_with_coverage(tracer, *runner_args):
os.environ['COVERAGE_TESTING'] = "True"
os.environ['COVERAGE_PROCESS_START'] = os.path.abspath('metacov.ini')
os.environ['COVERAGE_HOME'] = os.getcwd()
+ context = os.environ.get('COVERAGE_CONTEXT')
+ if context:
+ os.environ['COVERAGE_CONTEXT'] = context + "." + tracer
# Create the .pth file that will let us measure coverage in sub-processes.
# The .pth file seems to have to be alphabetically after easy-install.pth
@@ -192,7 +195,7 @@ def do_combine_html():
cov.load()
cov.combine()
cov.save()
- show_contexts = bool(os.environ.get('COVERAGE_CONTEXT'))
+ show_contexts = bool(os.environ.get('COVERAGE_DYNCTX') or os.environ.get('COVERAGE_CONTEXT'))
cov.html_report(show_contexts=show_contexts)
cov.xml_report()