TestingΒΆ

The repository keeps its test matrix split by responsibility instead of mixing everything into one giant suite.

Use this page to decide which test surface you need:

  • Static Quality Checks for linting, import ordering, and repository-wide formatting checks on src and tests

  • Unit Tests for fast feedback on validation, transport mapping, vector-store behavior, and embeddings behavior with fakes

  • Live Integration Tests for end-to-end checks against a real GoodMem server

  • Test Helpers for the shared environment contract and cleanup policy behind the live suite

Local quality commands:

ruff check src tests
ruff format --check src tests

The package-level tests docstring below contains the canonical commands for setting up the contributor environment and running the suite.

Test matrix and contributor entry points for langchain-goodmem.

Set up the local contributor environment once:

python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[test]'

Run the static quality checks with:

./.venv/bin/ruff check src tests
./.venv/bin/ruff format --check src tests

Run the unit suite with:

./.venv/bin/python -m pytest       tests/test_connection_unit.py       tests/test_embeddings_unit.py       tests/test_resources_unit.py       tests/test_transport_unit.py       tests/test_vectorstore_unit.py

Run the live integration suite with:

./.venv/bin/python -m pytest       tests/test_integration_existing_space_live.py       tests/test_integration_create_live.py       tests/test_integration_embeddings_live.py       -m integration

Coverage focus:

  • GoodMemConnection.from_env()

  • GoodMemResources resource CRUD and clean-slate vector-store bootstrap

  • vector-store create, write, and chunk-search flows

  • embeddings configuration, upstream credential resolution, bootstrap behavior, and create-time integration behavior

  • transport error normalization

  • one live existing-space path, one live create-helper path, and one live embeddings bootstrap plus embeddings-driven path

This section stays focused on how to run the test matrix and where to find more detailed coverage notes for each suite.