[GRASS-git] [OSGeo/grass] 43c934: grass.jupyter: add tests for utils helpers (#7486)

Valyrian-Code noreply at github.com
Sat Jun 6 10:11:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 43c934e9d24eaedfb2e5db74f9a51b97e3f01954
      https://github.com/OSGeo/grass/commit/43c934e9d24eaedfb2e5db74f9a51b97e3f01954
  Author: Rajveer* <irajveer.bishnoi2310 at gmail.com>
  Date:   2026-06-06 (Sat, 06 Jun 2026)

  Changed paths:
    A python/grass/jupyter/tests/grass_jupyter_utils_test.py

  Log Message:
  -----------
  grass.jupyter: add tests for utils helpers (#7486)

* grass.jupyter: add tests for utils helpers

get_rendering_size and get_map_name_from_d_command in grass.jupyter.utils had no direct test coverage. Both are pure, deterministic, and free of rendering or optional mapping dependencies. Add a pytest module covering get_rendering_size across all aspect-ratio branches and get_map_name_from_d_command across its default, per-command special-case, missing, and non-string inputs.

* grass.jupyter: add edge-case tests for utils helpers

Following review: add get_map_name_from_d_command cases for map=None and for multiple maps passed to d.rgb (only the primary red map is returned), and get_rendering_size cases documenting round()'s half-to-even behavior (2.5 -> 2, 3.5 -> 4).



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