mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-12 12:47:53 +02:00
more test fixes
This commit is contained in:
@@ -5468,11 +5468,6 @@ def test_interrupt_task_functional(
|
||||
resumable=True,
|
||||
ns=[AnyStr("graph:"), AnyStr("bar:")],
|
||||
),
|
||||
Interrupt(
|
||||
value="Provide value for bar:",
|
||||
resumable=True,
|
||||
ns=[AnyStr("graph:"), AnyStr("bar:")],
|
||||
),
|
||||
]
|
||||
}
|
||||
# Resume with an answer
|
||||
@@ -5497,11 +5492,6 @@ def test_interrupt_task_functional(
|
||||
resumable=True,
|
||||
ns=[AnyStr("graph:"), AnyStr("bar:")],
|
||||
),
|
||||
Interrupt(
|
||||
value="Provide value for bar:",
|
||||
resumable=True,
|
||||
ns=[AnyStr("graph:"), AnyStr("bar:")],
|
||||
),
|
||||
]
|
||||
}
|
||||
# Provide resumes
|
||||
|
||||
@@ -6873,7 +6873,15 @@ async def test_interrupt_task_functional(checkpointer_name: str) -> None:
|
||||
|
||||
config = {"configurable": {"thread_id": "1"}}
|
||||
# First run, interrupted at bar
|
||||
await graph.ainvoke({"a": ""}, config)
|
||||
assert graph.ainvoke({"a": ""}, config) == {
|
||||
"__interrupt__": [
|
||||
Interrupt(
|
||||
value="Provide value for bar:",
|
||||
resumable=True,
|
||||
ns=[AnyStr("graph:"), AnyStr("bar:")],
|
||||
),
|
||||
]
|
||||
}
|
||||
# Resume with an answer
|
||||
res = await graph.ainvoke(Command(resume="bar"), config)
|
||||
assert res == {"a": "foobar"}
|
||||
|
||||
Reference in New Issue
Block a user