[GRASS-git] [OSGeo/grass] 98c4cc: tests: Use copy of env for init (#6513)

Vaclav Petras noreply at github.com
Thu Oct 16 05:57:29 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 98c4ccf0c3dcb4266d63dd1a108a2ff44fdc880d
      https://github.com/OSGeo/grass/commit/98c4ccf0c3dcb4266d63dd1a108a2ff44fdc880d
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2025-10-16 (Thu, 16 Oct 2025)

  Changed paths:
    M python/grass/tools/tests/grass_tools_session_tools_pack_test.py
    M raster/r.out.gdal/tests/test_r_out_gdal.py
    M vector/v.colors/tests/test_v_colors.py
    M vector/v.decimate/tests/test_v_decimate.py

  Log Message:
  -----------
  tests: Use copy of env for init (#6513)

Some tests were not using a copy of the global environment and were modifying os.environ. This is a bad practice in the tests. While the fix is easy, preventing this from happening again is not possible with the current code since we want it to be easy to use the global environment.

The global environment is still used in tests of grass.jupyter, but there we need first to add an env parameter everywhere to enable the isolated testing, so that's not covered in this changeset.



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