This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6ede4d3208 Combine coverage databases to include output from 
multiprocessing (#37485)
6ede4d3208 is described below

commit 6ede4d3208575cdadce3472f039520065f42120d
Author: Dylan Rajguru <[email protected]>
AuthorDate: Fri Feb 16 10:10:15 2024 -0800

    Combine coverage databases to include output from multiprocessing (#37485)
---
 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:

Reply via email to