Files
langgraph/libs/checkpoint-conformance/tests/test_validate_memory.py
T
Elior Nataf LackritzandGitHub 26356227c4 test(checkpoint): run the delta conformance suite against InMemorySaver in CI (#9261)
The conformance self-test in `libs/checkpoint-conformance` ran every
capability against `InMemorySaver` but asserted only the base ones.
`libs/checkpoint/tests/test_conformance_delta.py`, which ran the delta
conformance tests against it, always skips in CI: `libs/checkpoint`
can't depend on the conformance package, which depends on it. So no CI
job checked `InMemorySaver.get_delta_channel_history` against the delta
conformance tests.

The self-test now asserts every capability `InMemorySaver` implements,
and the skipped copy is gone.

## Tests

- With `InMemorySaver.get_delta_channel_history` broken to return no
history, the self-test now fails on 7 of the 10 delta conformance tests;
on main it still passes.
- `make format`, `make lint` and `make test` pass in
`libs/checkpoint-conformance`.
2026-10-09 13:44:55 -04:00

22 lines
635 B
Python

"""Self-tests: run the conformance suite against InMemorySaver."""
from __future__ import annotations
import pytest
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.checkpoint.conformance import checkpointer_test, validate
@checkpointer_test(name="InMemorySaver")
async def memory_checkpointer():
yield InMemorySaver()
@pytest.mark.asyncio
async def test_validate_memory():
"""InMemorySaver passes the tests of every capability it implements."""
report = await validate(memory_checkpointer)
report.print_report()
assert report.passed_all(), f"Capability tests failed: {report.to_dict()}"