[GRASS-git] [OSGeo/grass] 9a3d80: lib/raster: Add bad line to reclass header error (...

Vaclav Petras noreply at github.com
Wed Sep 10 11:10:06 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 9a3d800fc8ea4479326d83aaba3bb856635dfd56
      https://github.com/OSGeo/grass/commit/9a3d800fc8ea4479326d83aaba3bb856635dfd56
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2025-09-10 (Wed, 10 Sep 2025)

  Changed paths:
    M lib/raster/reclass.c
    A lib/raster/tests/conftest.py
    A lib/raster/tests/lib_raster_reclass_test.py
    M raster/r.random.surface/testsuite/test_r_random_surface.py
    A raster/r.random.surface/testsuite/test_r_random_surface_with_mask.py

  Log Message:
  -----------
  lib/raster: Add bad line to reclass header error (#6339)

When a line has an unexpected format when reading reclass map header file, a warning is issued (before the fatal error), but the warning does not give any details. This adds the problematic line to the warning by passing it to the caller through an optional pointer to a string parameter. The reported error message now reports details about the parsing state.

A pytest test which tests the normal behavior and also pytest tests specifically for the error states are added.

Also, make the existing r.random.surface with mask a separate test file (as an alternative to a separate test which is trying to be similar and also to avoid wondering if there is any mask interaction with the other test methods).



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