From 706c1269901ba6d795050385c27dfdd4e7d84f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:05:26 +0200 Subject: [PATCH 1/2] Apply suggested fix to python/grass/gunittest/reporters.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- python/grass/gunittest/reporters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/grass/gunittest/reporters.py b/python/grass/gunittest/reporters.py index 43f6440f84b..a89cf2dcbb3 100644 --- a/python/grass/gunittest/reporters.py +++ b/python/grass/gunittest/reporters.py @@ -1117,7 +1117,7 @@ def report_for_dir(self, root: StrPath, directory: StrPath, test_files) -> str: self.total += summary["total"] dir_failures += summary["failures"] - dir_errors += summary["failures"] + dir_errors += summary["errors"] dir_skipped += summary["skipped"] dir_successes += summary["successes"] dir_expected_failures += summary["expected_failures"] From 5ee73ab5b758b6d4c8f3c98758b300d4b211aab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:05:26 +0200 Subject: [PATCH 2/2] Apply suggested fix to python/grass/gunittest/reporters.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- python/grass/gunittest/reporters.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/grass/gunittest/reporters.py b/python/grass/gunittest/reporters.py index a89cf2dcbb3..66e774f0484 100644 --- a/python/grass/gunittest/reporters.py +++ b/python/grass/gunittest/reporters.py @@ -475,10 +475,10 @@ def html_file_preview(filename): before = "
"
after = ""
if not Path(filename).is_file():
- return 'File %s does not exist
' % filename size = Path(filename).stat().st_size if not size: - return 'File %s is empty
' % filename max_size = 10000 html = StringIO() html.write(before) @@ -495,7 +495,7 @@ def tail(filename, n): for line in tail(filename, 50): html.write(color_error_line(html_escape(line))) else: - return 'File %s is too large to show
' % filename html.write(after) return html.getvalue()