From 7a282f82dc938378696211f4402da24e855f94f4 Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Tue, 8 Oct 2024 20:55:49 +0200 Subject: [PATCH] Tests? --- libs/langgraph/tests/test_pregel_async.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/libs/langgraph/tests/test_pregel_async.py b/libs/langgraph/tests/test_pregel_async.py index b2d1d6538..3be52643b 100644 --- a/libs/langgraph/tests/test_pregel_async.py +++ b/libs/langgraph/tests/test_pregel_async.py @@ -9944,15 +9944,19 @@ async def test_debug_nested_subgraphs(): (AnyStr("gp_two:"), AnyStr("p_two:")), ] - history_ns = { - ns: [ - c - async for c in graph.aget_state_history( - {"configurable": {"thread_id": "1", "checkpoint_ns": "|".join(ns)}} - ) - ][::-1] - for ns in stream_ns.keys() - } + history_ns = {} + for ns in stream_ns.keys(): + + async def get_history(): + history = [ + c + async for c in graph.aget_state_history( + {"configurable": {"thread_id": "1", "checkpoint_ns": "|".join(ns)}} + ) + ] + return history[::-1] + + history_ns[ns] = await get_history() def normalize_config(config: Optional[dict]) -> Optional[dict]: if config is None: