From 660fe99e2f0e0210d15b3223ffee9da89186fb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 10 Aug 2025 22:06:37 +0000 Subject: [PATCH 1/5] grass.gunittest: Always consider svn unavailable Quick bypass of the subprocess calls to svn, called for each file but never successful. --- python/grass/gunittest/reporters.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/grass/gunittest/reporters.py b/python/grass/gunittest/reporters.py index db6a9dcf4c2..5606c37cde3 100644 --- a/python/grass/gunittest/reporters.py +++ b/python/grass/gunittest/reporters.py @@ -174,6 +174,7 @@ def get_svn_revision(): :returns: SVN revision number as string or None if it is not possible to get """ + return None # TODO: here should be starting directory # but now we are using current as starting with subprocess.Popen( @@ -197,6 +198,7 @@ def get_svn_info(): :returns: SVN info as dictionary or None if it is not possible to obtain it """ + return None try: # TODO: introduce directory, not only current with subprocess.Popen( @@ -250,6 +252,7 @@ def get_svn_path_authors(path, from_date=None): :returns: a set of authors """ + return None # "BASE:1" is the SVN default for local copies revision_range = "BASE:1" if from_date is None else "BASE:{%s}" % from_date try: From 5c19b93243eeb7de48f8ac8cd0311b4da9630d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 24 Aug 2025 14:39:29 +0000 Subject: [PATCH 2/5] grass.script: Fix test_append_node_pid test using legalize_vector_name --- python/grass/script/testsuite/test_names.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/grass/script/testsuite/test_names.py b/python/grass/script/testsuite/test_names.py index 5a61cc8a74f..028db777907 100644 --- a/python/grass/script/testsuite/test_names.py +++ b/python/grass/script/testsuite/test_names.py @@ -17,7 +17,9 @@ def test_append_node_pid(self): self.assertIn(base_name, full_name) self.assertGreater(len(full_name), len(base_name)) self.assertIn(str(os.getpid()), full_name) - self.assertIn(utils.legalize_vector_name(platform.node()), full_name) + self.assertIn( + utils.legalize_vector_name(platform.node(), fallback_prefix=""), full_name + ) self.assertTrue(legal_name(full_name)) # TODO: It should be also a valid vector name # but we don't have a function for that (same for all) From 514f2eec8f0f5ad509990259b215f897f700fc95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:25:10 +0000 Subject: [PATCH 3/5] grass.gunittest: Specify encoding to files written in invoker.py --- python/grass/gunittest/invoker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/grass/gunittest/invoker.py b/python/grass/gunittest/invoker.py index 592d39401f8..34f4907ed30 100644 --- a/python/grass/gunittest/invoker.py +++ b/python/grass/gunittest/invoker.py @@ -66,7 +66,7 @@ def update_keyval_file(filename, module, returncode): keyval["returncode"] = returncode keyval["test_file_authors"] = test_file_authors - Path(filename).write_text(keyvalue_to_text(keyval)) + Path(filename).write_text(keyvalue_to_text(keyval), encoding="utf-8") return keyval @@ -351,7 +351,8 @@ def run_in_location( " (testsuite directories)" '
  • Results by test files
  • ' "