From 996b1206134c66cd9e7e3731641ee14eea689033 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Thu, 23 Jan 2025 16:59:27 -0800 Subject: [PATCH] Undo --- libs/langgraph/tests/test_pregel_async.py | 35 ----------------------- 1 file changed, 35 deletions(-) diff --git a/libs/langgraph/tests/test_pregel_async.py b/libs/langgraph/tests/test_pregel_async.py index 9b702f29e8..35d6143ddf 100644 --- a/libs/langgraph/tests/test_pregel_async.py +++ b/libs/langgraph/tests/test_pregel_async.py @@ -3,7 +3,6 @@ import operator import random import sys -import time import uuid from collections import Counter, deque from contextlib import asynccontextmanager, contextmanager @@ -2554,40 +2553,6 @@ async def graph(input: list[int]) -> list[str]: "11answera", ] - def syncmapper(input: int) -> str: - time.sleep(input / 100) - return submapper(input).result() * 2 - - @entrypoint(checkpointer=checkpointer) - async def graph(input: list[int]) -> list[str]: - mapped = [syncmapper(i) for i in input] - answer = interrupt("question") - final = [m + answer for m in mapped] - return await add_a.ainvoke(final) - - thread1 = {"configurable": {"thread_id": "1"}} - assert [c async for c in graph.astream([0, 1], thread1)] == [ - {"submapper": "0"}, - {"syncmapper": "00"}, - {"submapper": "1"}, - {"syncmapper": "11"}, - { - "__interrupt__": ( - Interrupt( - value="question", - resumable=True, - ns=[AnyStr("graph:")], - when="during", - ), - ) - }, - ] - - assert await graph.ainvoke(Command(resume="answer"), thread1) == [ - "00answera", - "11answera", - ] - @NEEDS_CONTEXTVARS @pytest.mark.parametrize("checkpointer_name", ALL_CHECKPOINTERS_ASYNC)