Skip to content

Route tests by backend marks and isolate test databases - #70

Open
nicoloesch wants to merge 2 commits into
mainfrom
69-test-conventions
Open

nicoloesch wants to merge 2 commits into
mainfrom
69-test-conventions

Conversation

@nicoloesch

Copy link
Copy Markdown
Collaborator

Note Once oa-configurator is released, bump the oa-configurator constraint in pyproject.toml to the release that contains AustralianCancerDataNetwork/oa-configurator#62 and refresh uv.lock with uv lock. The test fixtures pass routing_mark, which only exists in the new oa-configurator, so CI fails until then.

Summary

  • Routes tests by backend. sqlitevec, pgvector, duckdbvss and faiss name the infrastructure a test needs and select the CI job, and the fixtures pass the matching routing_mark, so a test without it fails at setup.
  • Removes db_dialect, unit and integration. A test with a routing mark needs infrastructure and a test without one needs none. The tests that open a SQLite database carry sqlitevec.
  • The registry, reader, prune and metric tests run on every backend they apply to. They are parametrized over BackendType with BACKEND_PARAMS, and each param carries its routing mark. DuckDB VSS gains tests for the metrics it supports.
  • --strict-markers is set, the Dialect enum replaces string literals, and ruff TID251 bans inline engines in tests.
  • pytest.importorskip is gone, because CI installs every extra. The pgvector 0.8 test now fails on an older pgvector instead of skipping.
  • ci.yml adds the nodb job and a build-test-faiss job. The sqlite job runs sqlitevec and not pgvector, because the bundle test uses both backends and runs in the postgres job.

Checklist

  • Applied exactly one label (breaking, feature, fix, dependencies, or chore)
  • Tests pass locally (uv run pytest -q)
  • Lint passes (uv run ruff check .)

@nicoloesch nicoloesch added the chore Maintenance, refactoring, or housekeeping. Excluded from changelog, no version bump. label Nov 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, refactoring, or housekeeping. Excluded from changelog, no version bump.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt the routing-mark conventions

1 participant