mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-28 12:35:08 +02:00
Bump mypy 1.20.2 -> 2.1.0 in checkpoint, checkpoint-postgres, checkpoint-sqlite, cli, langgraph, prebuilt and sdk-py, and fix the type errors surfaced by the stricter checker. Only mypy and its transitive deps (librt, ast-serialize) change in the lockfiles; no runtime dependencies are bumped. All changes are type-only (annotations, casts, type-ignore adjustments) with no runtime behaviour change. make lint passes in every affected lib. Supersedes dependabot PRs #7969, #7970 and #7974, and removes the mypy portion of the grouped bumps in #7976 and #7972.
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
"""Run delta-channel conformance capabilities against InMemorySaver."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from collections.abc import AsyncIterator
|
|
|
|
import pytest
|
|
|
|
conformance = pytest.importorskip(
|
|
"langgraph.checkpoint.conformance",
|
|
reason="langgraph-checkpoint-conformance not installed",
|
|
)
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_delta_channel_conformance() -> None:
|
|
from langgraph.checkpoint.conformance import validate
|
|
from langgraph.checkpoint.conformance.initializer import checkpointer_test
|
|
|
|
from langgraph.checkpoint.memory import InMemorySaver
|
|
|
|
@checkpointer_test(name="InMemorySaver")
|
|
async def mem_saver() -> AsyncIterator[InMemorySaver]:
|
|
yield InMemorySaver()
|
|
|
|
report = await validate(
|
|
mem_saver,
|
|
capabilities={
|
|
"delta_channel_history",
|
|
},
|
|
)
|
|
for cap, result in report.results.items():
|
|
if result.passed is False:
|
|
details = "\n".join(result.failures or [])
|
|
pytest.fail(f"Capability {cap} failed:\n{details}")
|