Conformance test suite for LangGraph checkpointer implementations.
Project description
langgraph-checkpoint-conformance
Conformance test suite for LangGraph checkpointer implementations.
Validates that a BaseCheckpointSaver subclass correctly implements the checkpoint storage contract — blob round-trips, metadata preservation, namespace isolation, incremental channel updates, and more.
Installation
pip install langgraph-checkpoint-conformance
Quick start
Register your checkpointer with @checkpointer_test and run validate():
import asyncio
from langgraph.checkpoint.conformance import checkpointer_test, validate
@checkpointer_test(name="MyCheckpointer")
async def my_checkpointer():
saver = MyCheckpointer(...)
yield saver
# cleanup runs after yield
async def main():
report = await validate(my_checkpointer)
report.print_report()
assert report.passed_all_base()
asyncio.run(main())
Or in a pytest test:
import pytest
from langgraph.checkpoint.conformance import checkpointer_test, validate
@checkpointer_test(name="MyCheckpointer")
async def my_checkpointer():
yield MyCheckpointer(...)
@pytest.mark.asyncio
async def test_conformance():
report = await validate(my_checkpointer)
report.print_report()
assert report.passed_all_base()
Capabilities
The suite tests base capabilities (required) and extended capabilities (optional, auto-detected):
| Capability | Required | Method |
|---|---|---|
put |
yes | aput |
put_writes |
yes | aput_writes |
get_tuple |
yes | aget_tuple |
list |
yes | alist |
delete_thread |
yes | adelete_thread |
delete_for_runs |
no | adelete_for_runs |
copy_thread |
no | acopy_thread |
prune |
no | aprune |
Extended capabilities are detected by checking whether the method is overridden from BaseCheckpointSaver. If not overridden, those tests are skipped.
Options
Progress output
from langgraph.checkpoint.conformance.report import ProgressCallbacks
# Dot-style progress (. per pass, F per fail)
report = await validate(my_checkpointer, progress=ProgressCallbacks.default())
# Verbose (per-test names + stacktraces on failure)
report = await validate(my_checkpointer, progress=ProgressCallbacks.verbose())
Skip capabilities
@checkpointer_test(name="MyCheckpointer", skip_capabilities={"prune"})
async def my_checkpointer():
yield MyCheckpointer(...)
Run specific capabilities
report = await validate(my_checkpointer, capabilities={"put", "list"})
Lifespan (one-time setup/teardown)
For expensive setup like database creation:
async def db_lifespan():
await create_database()
yield
await drop_database()
@checkpointer_test(name="PostgresSaver", lifespan=db_lifespan)
async def pg_checkpointer():
async with PostgresSaver.from_conn_string(CONN_STRING) as saver:
yield saver
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langgraph_checkpoint_conformance-0.0.2.tar.gz.
File metadata
- Download URL: langgraph_checkpoint_conformance-0.0.2.tar.gz
- Upload date:
- Size: 93.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6718e00937bf2f04cdfd2cdfabea23e1dabb79a534ff4c127f305f6b40dad4e0
|
|
| MD5 |
4a7d35f17502f83342866e282faac339
|
|
| BLAKE2b-256 |
81da93e4e31f1f64eb12eb9b1a721161708ed7cdcacf9a105d6f6c203f903721
|
File details
Details for the file langgraph_checkpoint_conformance-0.0.2-py3-none-any.whl.
File metadata
- Download URL: langgraph_checkpoint_conformance-0.0.2-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c112ddc0416b097c90a145fd1908ba570db4cba209e1ae0330205e9f466ad4f9
|
|
| MD5 |
bdafbbbc42d4b074c6253727ff5c4233
|
|
| BLAKE2b-256 |
ffed27dc4ce19f9c848521e45cbf778b1a8d8d774fa468bab67f5a5fd51e9fe0
|