diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-07 18:13:52 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-08 07:20:46 -0500 |
| commit | 886292408b1363fdf62bd473ec45f9596aae8a67 (patch) | |
| tree | d842aaf86b37c42d3527207df1ee8adf9e84316a | |
| parent | b40e3c89d264c021a29db90dcfd3ab58f3f8ab0e (diff) | |
| download | python-coveragepy-git-886292408b1363fdf62bd473ec45f9596aae8a67.tar.gz | |
test: simplify the metacov flow a bit
- default COVERAGE_METAFILE=.metacov for convenience
- don't make json and xml reports, if we need them we'll do it
explicitly.
| -rw-r--r-- | .github/workflows/coverage.yml | 1 | ||||
| -rw-r--r-- | igor.py | 5 | ||||
| -rw-r--r-- | metacov.ini | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 578c909a..fadad42a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -123,7 +123,6 @@ jobs: id: combine env: COVERAGE_RCFILE: "metacov.ini" - COVERAGE_METAFILE: ".metacov" COVERAGE_CONTEXT: "yes" run: | set -xe @@ -210,18 +210,15 @@ def run_tests_with_coverage(tracer, *runner_args): def do_combine_html(): - """Combine data from a meta-coverage run, and make the HTML and XML reports.""" + """Combine data from a meta-coverage run, and make the HTML report.""" import coverage os.environ['COVERAGE_HOME'] = os.getcwd() - os.environ['COVERAGE_METAFILE'] = os.path.abspath(".metacov") cov = coverage.Coverage(config_file="metacov.ini") cov.load() cov.combine() cov.save() show_contexts = bool(os.environ.get('COVERAGE_DYNCTX') or os.environ.get('COVERAGE_CONTEXT')) cov.html_report(show_contexts=show_contexts) - cov.xml_report() - cov.json_report(pretty_print=True) def do_test_with_tracer(tracer, *runner_args): diff --git a/metacov.ini b/metacov.ini index a18dff82..29251f36 100644 --- a/metacov.ini +++ b/metacov.ini @@ -8,7 +8,7 @@ [run] branch = true -data_file = ${COVERAGE_METAFILE?} +data_file = ${COVERAGE_METAFILE-.metacov} parallel = true relative_files = true source = @@ -20,7 +20,7 @@ dynamic_context = ${COVERAGE_DYNCTX-none} context = ${COVERAGE_CONTEXT-none} [report] -# We set a different pragmas so our code won't be confused with test code, and +# We set different pragmas so our code won't be confused with test code, and # we use different pragmas for different reasons that the lines won't be # measured. exclude_lines = |
