This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-8-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 056abac4f2222f019c9dd4021231054dc300299d Author: Dylan Rajguru <[email protected]> AuthorDate: Fri Feb 16 10:10:15 2024 -0800 Combine coverage databases to include output from multiprocessing (#37485) (cherry picked from commit 6ede4d3208575cdadce3472f039520065f42120d) --- scripts/cov/cov_runner.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/cov/cov_runner.py b/scripts/cov/cov_runner.py index 480e46e257..8db53ab019 100644 --- a/scripts/cov/cov_runner.py +++ b/scripts/cov/cov_runner.py @@ -25,10 +25,11 @@ from coverage.exceptions import NoSource 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, @@ -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:
