Fix ansible-test handling of no Python coverage.
This commit is contained in:
parent
99e136e153
commit
50442f9fdd
2 changed files with 7 additions and 2 deletions
2
changelogs/fragments/ansible-test-empty-coverage.yml
Normal file
2
changelogs/fragments/ansible-test-empty-coverage.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- ansible-test no longer errors reporting coverage when no Python coverage exists. This fixes issues reporting on PowerShell only coverage from collections.
|
|
@ -110,8 +110,11 @@ def _command_coverage_combine_python(args):
|
||||||
|
|
||||||
if not args.explain:
|
if not args.explain:
|
||||||
output_file = coverage_file + group
|
output_file = coverage_file + group
|
||||||
updated.write_file(output_file)
|
updated.write_file(output_file) # always write files to make sure stale files do not exist
|
||||||
output_files.append(output_file)
|
|
||||||
|
if updated:
|
||||||
|
# only report files which are non-empty to prevent coverage from reporting errors
|
||||||
|
output_files.append(output_file)
|
||||||
|
|
||||||
path_checker.report()
|
path_checker.report()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue