Skip to content

Commit 543ea7f

Browse files
committed
fix(coverage): Disable certain coverage warnings.
These warnings appear if there are no Python source files in the instrumented directories, cf. #2762. Work towards #2762
1 parent 5e75007 commit 543ea7f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

python/private/python_bootstrap_template.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ def _RunForCoverage(python_program, main_filename, args, env,
438438
with open(rcfile_name, "w") as rcfile:
439439
rcfile.write('''[run]
440440
relative_files = True
441+
disable_warnings = module-not-imported, no-data-collected
441442
source =
442443
\t{source}
443444
'''.format(source=source))

python/private/stage2_bootstrap_template.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ def _maybe_collect_coverage(enable):
321321
rcfile.write(
322322
f"""[run]
323323
relative_files = True
324+
disable_warnings = module-not-imported, no-data-collected
324325
source =
325326
\t{source}
326327
"""

0 commit comments

Comments
 (0)