Skip to content

Commit 8862924

Browse files
committed
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.
1 parent b40e3c8 commit 8862924

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

.github/workflows/coverage.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ jobs:
123123
id: combine
124124
env:
125125
COVERAGE_RCFILE: "metacov.ini"
126-
COVERAGE_METAFILE: ".metacov"
127126
COVERAGE_CONTEXT: "yes"
128127
run: |
129128
set -xe

igor.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,15 @@ def run_tests_with_coverage(tracer, *runner_args):
210210

211211

212212
def do_combine_html():
213-
"""Combine data from a meta-coverage run, and make the HTML and XML reports."""
213+
"""Combine data from a meta-coverage run, and make the HTML report."""
214214
import coverage
215215
os.environ['COVERAGE_HOME'] = os.getcwd()
216-
os.environ['COVERAGE_METAFILE'] = os.path.abspath(".metacov")
217216
cov = coverage.Coverage(config_file="metacov.ini")
218217
cov.load()
219218
cov.combine()
220219
cov.save()
221220
show_contexts = bool(os.environ.get('COVERAGE_DYNCTX') or os.environ.get('COVERAGE_CONTEXT'))
222221
cov.html_report(show_contexts=show_contexts)
223-
cov.xml_report()
224-
cov.json_report(pretty_print=True)
225222

226223

227224
def do_test_with_tracer(tracer, *runner_args):

metacov.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[run]
1010
branch = true
11-
data_file = ${COVERAGE_METAFILE?}
11+
data_file = ${COVERAGE_METAFILE-.metacov}
1212
parallel = true
1313
relative_files = true
1414
source =
@@ -20,7 +20,7 @@ dynamic_context = ${COVERAGE_DYNCTX-none}
2020
context = ${COVERAGE_CONTEXT-none}
2121

2222
[report]
23-
# We set a different pragmas so our code won't be confused with test code, and
23+
# We set different pragmas so our code won't be confused with test code, and
2424
# we use different pragmas for different reasons that the lines won't be
2525
# measured.
2626
exclude_lines =

0 commit comments

Comments
 (0)