mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-10-17 21:55:30 +02:00
The conformance self-test asserted only the base capabilities, and the libs/checkpoint copy of the delta conformance run always skips in CI, so no CI job checked InMemorySaver's delta history against the suite. The self-test now asserts every capability InMemorySaver implements, and the skipped copy is gone.
22 lines
635 B
Python
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()}"
|