diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-10-07 11:18:09 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-10-07 11:18:09 -0400 |
commit | b892fd503ae46f7f98db172e77d8f84cc63289a5 (patch) | |
tree | 1bc4c187aab4025b03de39380387374a6d30bdda | |
parent | df6abbe9eef2e7884654d87be0bc1591d4f9cf6d (diff) | |
download | python-coveragepy-git-b892fd503ae46f7f98db172e77d8f84cc63289a5.tar.gz |
All-in on contexts for ourselves
-rw-r--r-- | igor.py | 2 | ||||
-rw-r--r-- | metacov.ini | 8 |
2 files changed, 7 insertions, 3 deletions
@@ -118,6 +118,7 @@ def run_tests_with_coverage(tracer, *runner_args): version += "_%s%s" % sys.pypy_version_info[:2] suffix = "%s%s_%s_%s" % (impl, version, tracer, platform.platform()) + os.environ['COVERAGE_PYVERSION'] = version os.environ['COVERAGE_METAFILE'] = os.path.abspath(".metacov."+suffix) import coverage @@ -159,6 +160,7 @@ def do_combine_html(): """Combine data from a meta-coverage run, and make the HTML and XML reports.""" import coverage os.environ['COVERAGE_HOME'] = os.getcwd() + os.environ['COVERAGE_PYVERSION'] = '' os.environ['COVERAGE_METAFILE'] = os.path.abspath(".metacov") cov = coverage.Coverage(config_file="metacov.ini") cov.load() diff --git a/metacov.ini b/metacov.ini index 50ea524d..fc85f26e 100644 --- a/metacov.ini +++ b/metacov.ini @@ -4,11 +4,13 @@ # Settings to use when using coverage.py to measure itself. [run] branch = true -data_file = $COVERAGE_METAFILE +data_file = ${COVERAGE_METAFILE?} parallel = true source = - $COVERAGE_HOME/coverage - $COVERAGE_HOME/tests + ${COVERAGE_HOME?}/coverage + ${COVERAGE_HOME?}/tests +context = ${COVERAGE_PYVERSION?} +dynamic_context = test_function [report] # We set a different pragma so our code won't be confused with test code. |