Skip to content

Running the Test Suite

Amy Wooding edited this page Aug 5, 2026 · 2 revisions

Toponmy uses pytest and the tests live under toponymy/tests/. There are several types of tests that run on separate triggers:

  1. Unit tests: Testing individual components. Runs on PRs.
  2. External tests: Tests API calls to some LLM providers. Runs on a nightly schedule
  3. Notebook Tests: Tests the read the docs notebooks run to completion. Runs Getting Started and changed notebooks on PR. Runs all docs notebooks on a weekly cadence.

Running the tests

Once your development environment is set up, you're ready to run the test suite.

Run all tests:

uv run pytest toponymy/tests -v

Run a specific test file:

uv run pytest toponymy/tests/test_toponymy.py -v

Run tests with coverage (similar to how tests run in CI):

uv run pytest toponymy/tests --show-capture=no -v --disable-warnings \
--junitxml=junit/test-results.xml \
--cov=toponymy/ --cov-report=xml --cov-report=html

Clone this wiki locally