From 886292408b1363fdf62bd473ec45f9596aae8a67 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 7 Nov 2022 18:13:52 -0500 Subject: 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. --- .github/workflows/coverage.yml | 1 - igor.py | 5 +---- 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 diff --git a/igor.py b/igor.py index a21fb39b..d78dff98 100644 --- a/igor.py +++ b/igor.py @@ -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 = -- cgit v1.2.1