Skip to content

how to contribute testing

Bryan edited this page Jun 13, 2026 · 1 revision

Testing

Tests use Python unittest and run under coverage in CI. The main suites cover indexing, storage, graph resolution, daemon behavior, observability, benchmarks, and packaging smoke checks.

Test layout

File Coverage focus
tests/test_lode.py CLI, indexing, search, symbol lookup, context, embeddings, Kuzu guards
tests/test_graph.py imports, method calls, duplicate symbols, blast radius, impact output
tests/test_observability.py redaction, structured logs, metrics rendering
tests/test_e2e.py daemon and Docker Compose smoke coverage
tests/test_benchmarks.py benchmark helpers and adapter behavior
tests/smoke_test.py installed package entry points

Standard test commands

uv run coverage run -m unittest discover -s tests -v
uv run coverage report

Use a focused suite while iterating:

uv run python -m unittest tests.test_graph -v
uv run python -m unittest tests.test_lode -v

Docker e2e

tests/test_e2e.py has an opt-in Docker path. Run it only when Docker is available and you need full Compose coverage:

RUN_LODE_DOCKER_E2E=1 uv run python -m unittest tests.test_e2e -v

Patterns

Tests commonly create temporary repositories, call index_repo() from src/lode/indexer.py, then query SQLite through src/lode/storage.py or src/lode/graph.py. This gives high-signal regression tests without a long-running daemon.

Related pages

Clone this wiki locally