This document describes how to run the test suite for the application.
Ensure you have the development dependencies installed. You can install them along with the package in editable mode using uv:
uv pip install -e '.[dev]'To run all tests, including linting with Ruff, code coverage with pytest-cov, and the pytest suite itself, you can use the provided Makefile:
make lint-testThis command will:
- Check code formatting and linting with Ruff
- Run the pytest suite with coverage reporting
The project uses Ruff for both linting and formatting:
To check your code for issues without modifying files:
make lintThis runs Ruff's check command on the codebase.
To automatically format your code:
make formatThis runs Ruff's format command and then applies any auto-fixes from the linter.
To check if code is properly formatted without modifying files (useful for CI):
make lint-checkYou can run the test suite using:
make testThis runs pytest (optionally in parallel) with a wall-clock timeout so the suite can’t hang forever.
- Default timeout: 180 seconds (3 minutes) for the entire run
- Override:
WALLCLOCK_TIMEOUT_SECONDS=0 make test(disable timeout; debug only)WALLCLOCK_TIMEOUT_SECONDS=900 make test(15 minutes)
You can run specific test files or even individual test functions using pytest arguments.
-
Run a specific test file:
pytest tests/api/test_example.py
-
Run tests in a specific directory:
pytest tests/services/
-
Run a specific test function using the
-kflag (keyword expression):pytest -k test_example
-
Run tests matching a specific marker (if you define markers later):
pytest -m <marker_name>
Coverage is automatically calculated when running pytest (as configured in pytest.ini). The report showing missing lines will be printed to the terminal.