Fix ansible-test handling of no Python coverage.

pull/68298/head
Matt Clay 5 years ago committed by Matt Martz
parent 99e136e153
commit 50442f9fdd

@ -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:
output_file = coverage_file + group
updated.write_file(output_file)
output_files.append(output_file)
updated.write_file(output_file) # always write files to make sure stale files do not exist
if updated:
# only report files which are non-empty to prevent coverage from reporting errors
output_files.append(output_file)
path_checker.report()

Loading…
Cancel
Save