diff options
-rw-r--r-- | igor.py | 5 | ||||
-rw-r--r-- | metacov.ini | 7 |
2 files changed, 7 insertions, 5 deletions
@@ -75,7 +75,7 @@ def should_skip(tracer): """Is there a reason to skip these tests?""" if tracer == "py": # $set_env.py: COVERAGE_NO_PYTRACER - Don't run the tests under the Python tracer. - skipper = os.environ.get("COVERAGE_NO_PYTRACER") + skipper = os.environ.get("COVERAGE_NO_PYTRACER") or os.environ.get("COVERAGE_CONTEXT") else: # $set_env.py: COVERAGE_NO_CTRACER - Don't run the tests under the C tracer. skipper = os.environ.get("COVERAGE_NO_CTRACER") @@ -174,7 +174,8 @@ def do_combine_html(): cov.load() cov.combine() cov.save() - cov.html_report() + show_contexts = bool(os.environ.get('COVERAGE_CONTEXT')) + cov.html_report(show_contexts=show_contexts) cov.xml_report() diff --git a/metacov.ini b/metacov.ini index 3d4b7cf7..d00019f8 100644 --- a/metacov.ini +++ b/metacov.ini @@ -7,9 +7,10 @@ branch = true data_file = ${COVERAGE_METAFILE?} parallel = true source = - ${COVERAGE_HOME?}/coverage - ${COVERAGE_HOME?}/tests -dynamic_context = none + ${COVERAGE_HOME-.}/coverage + ${COVERAGE_HOME-.}/tests +# $set_env.py: COVERAGE_CONTEXT - set to 'test_function' for who-tests-what +dynamic_context = ${COVERAGE_CONTEXT-none} [report] # We set a different pragma so our code won't be confused with test code. |