[GRASS-git] [OSGeo/grass] 85fa0b: tests: Use db.test tool in tests (#6473)

Vaclav Petras noreply at github.com
Fri Oct 10 07:16:27 PDT 2025


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

  Changed paths:
    M scripts/db.test/Makefile
    M scripts/db.test/db.test.py
    A scripts/db.test/tests/db_test_test.py

  Log Message:
  -----------
  tests: Use db.test tool in tests (#6473)

The db.test tool allows to run a basic suite of SQL tests with the given connection in a mapset, but the tool itself was not used in the tests. This adds pytest-based tests which use db.test with SQLite driver.

Additionally, this fixes the code to provide a better message when the connection information (and/or the connection itself) does not exist.

In the Makefile, specify the db.test SQL test text file explicitly, avoiding wildcard which matches the tests directory. (CMakeList.txt already does that.)

Run db.connect with -c which fits with the documentation, although running without parameters seems to be possible on Linux and macOS (but fails on Windows).



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