Skip to content

Commit

Permalink
Combine coverage databases to include output from multiprocessing (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
drajguru authored Feb 16, 2024
1 parent bcf2673 commit 6ede4d3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/cov/cov_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@


def run_tests(command_list, source, files_not_fully_covered):
covered = sorted(
{path for item in source for path in glob.glob(item + "/**/*.py", recursive=True)}
- {path for path in files_not_fully_covered}
)
source_set = {path for item in source for path in glob.glob(item + "/**/*.py", recursive=True)}
not_covered = {path for path in files_not_fully_covered}
source_files = sorted(source_set)
covered = sorted(source_set - not_covered)

cov = Coverage(
config_file="pyproject.toml",
source=source,
Expand All @@ -52,7 +53,8 @@ def run_tests(command_list, source, files_not_fully_covered):
except NoSource:
continue

cov.html_report()
cov.combine()
cov.html_report(morfs=source_files)
if failed:
print("There are some coverage errors. Please fix them")
if len(files_not_fully_covered) > 0:
Expand Down

0 comments on commit 6ede4d3

Please sign in to comment.