From 27e19efcbb00b6147074496f33e1653744604265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Thu, 3 Sep 2026 00:30:49 +0000 Subject: [PATCH] pytest: Run g.html2man testsuite test with pytest test_ghtml2man.py is a grass.gunittest.case.TestCase test that only parses the already-installed HTML manual pages, so it does not need an active GRASS session or the North Carolina sample dataset like most other testsuite files. Add it to the pytest allowlist and exclude it from the grass.gunittest runner, following the pattern used for the other tests already running under pytest. It reads the GISBASE environment variable, which the pytest.yml and macos.yml gunittest steps did not export before this change (osgeo4w.yml already exports it via env.bat), so export it there too. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_0169cUQFskpDPA7wVJ7paGVG --- .github/workflows/macos.yml | 2 ++ .github/workflows/pytest.yml | 2 ++ .github/workflows/pytest_args_gunittest.txt | 1 + .gunittest.cfg | 1 + 4 files changed, 6 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4aa66a8335a..a9e86349a86 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -124,8 +124,10 @@ jobs: run: | PYTHONPATH="$(grass --config python_path):${PYTHONPATH}" LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}" + GISBASE="$(grass --config path)" export PYTHONPATH export LD_LIBRARY_PATH + export GISBASE pytest \ @.github/workflows/pytest_args_gunittest.txt \ --junitxml=pytest.gunittest.junit.xml diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index bfd8d77b693..7ecf088570a 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -129,10 +129,12 @@ jobs: run: | PYTHONPATH="$(grass --config python_path):${PYTHONPATH}" LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}" + GISBASE="$(grass --config path)" INITIAL_GISBASE="$(grass --config path)" INITIAL_PWD="${PWD}" export PYTHONPATH export LD_LIBRARY_PATH + export GISBASE export INITIAL_GISBASE export INITIAL_PWD pytest \ diff --git a/.github/workflows/pytest_args_gunittest.txt b/.github/workflows/pytest_args_gunittest.txt index 77e2edfb293..1e45b603f8f 100644 --- a/.github/workflows/pytest_args_gunittest.txt +++ b/.github/workflows/pytest_args_gunittest.txt @@ -10,3 +10,4 @@ python/grass/pygrass/modules/interface/testsuite/test_parameter.py python/grass/pygrass/vector/testsuite/test_filters.py python/grass/script/testsuite/test_core_make_val.py python/grass/script/testsuite/test_utils.py +utils/g.html2man/testsuite/test_ghtml2man.py diff --git a/.gunittest.cfg b/.gunittest.cfg index 3655f2d4e37..3cee07b0c39 100644 --- a/.gunittest.cfg +++ b/.gunittest.cfg @@ -35,6 +35,7 @@ exclude = python/grass/pygrass/vector/testsuite/test_filters.py python/grass/script/testsuite/test_core_make_val.py python/grass/script/testsuite/test_utils.py + utils/g.html2man/testsuite/test_ghtml2man.py # Maximum time for execution of one test file (not a test function) # after which test is terminated (which may not terminate child processes