[GRASS-git] [OSGeo/grass] 6dc111: grass.temporal: Use an explicit env in the gui_sup...
Vaclav Petras
noreply at github.com
Thu Jul 16 09:43:01 PDT 2026
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: 6dc1110500c3e6eb9a5bb46772fab4214b1be2fd
https://github.com/OSGeo/grass/commit/6dc1110500c3e6eb9a5bb46772fab4214b1be2fd
Author: Vaclav Petras <wenzeslaus at gmail.com>
Date: 2026-07-16 (Thu, 16 Jul 2026)
Changed paths:
M AGENTS.md
M python/grass/temporal/tests/grass_temporal_gui_support_test.py
Log Message:
-----------
grass.temporal: Use an explicit env in the gui_support test session (#7732)
The temporal tests needs separate environment like all the other tests, but env can't be explicitly passes as for the rest of the API, so this uses pytest's monkeypatch to work around that.
The module-scoped fixture created its sessions with gs.setup.init()
without env, which sets the session up in the global os.environ. init()
prepends the GRASS executable paths to PATH on every call and never
removes them again, so PATH kept growing for the rest of the pytest
process, and later tests which copy os.environ inherited it. On Windows
this made r.coin fail on main since #7714 was merged: r.coin runs r.stats
in a subprocess, and supposedly, cmd.exe could no longer resolve it on the inherited
PATH, so r.coin reported an empty table.
Create the sessions with env=os.environ.copy() instead. tgis reads the
session from os.environ, so mirror the second session there with
monkeypatch, which restores the environment once the module is done. This
is what test_project_without_temporal_database in the same file already
does. The ultimate fix is for tgis to accept env, which would remove the
need for the monkey patch.
Additionally, document the rule and the tgis exception in AGENTS.md.
The investigation of the CI failure and this patch were done with the
assistance of Claude Code.
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list