From deeb2d6e92a60117e9266da18dfe92450614aa00 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Tue, 22 Apr 2025 08:26:47 -0700 Subject: [PATCH] Fix --- .../tests/__snapshots__/test_pregel_async.ambr | 14 ++++++++++---- libs/langgraph/tests/test_pregel.py | 4 ++++ libs/langgraph/tests/test_pregel_async.py | 12 +++++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/libs/langgraph/tests/__snapshots__/test_pregel_async.ambr b/libs/langgraph/tests/__snapshots__/test_pregel_async.ambr index 59d48f864..0832ff61e 100644 --- a/libs/langgraph/tests/__snapshots__/test_pregel_async.ambr +++ b/libs/langgraph/tests/__snapshots__/test_pregel_async.ambr @@ -3,11 +3,11 @@ ''' graph TD; __start__ --> rewrite_query; - rewrite_query --> analyzer_one; - rewrite_query -.-> retriever_two; analyzer_one --> retriever_one; retriever_one --> qa; retriever_two --> qa; + rewrite_query --> analyzer_one; + rewrite_query -.-> retriever_two; qa --> __end__; ''' @@ -122,13 +122,19 @@ # --- # name: test_send_react_interrupt_control[memory] ''' - %%{init: {'flowchart': {'curve': 'linear'}}}%% + --- + config: + flowchart: + curve: linear + --- graph TD; __start__([

__start__

]):::first agent(agent) - foo([foo]):::last + foo(foo) + __end__([

__end__

]):::last __start__ --> agent; agent -.-> foo; + foo --> __end__; classDef default fill:#f2f0ff,line-height:1.2 classDef first fill-opacity:0 classDef last fill:#bfb6fc diff --git a/libs/langgraph/tests/test_pregel.py b/libs/langgraph/tests/test_pregel.py index 6abcf5e4b..4aa3442ad 100644 --- a/libs/langgraph/tests/test_pregel.py +++ b/libs/langgraph/tests/test_pregel.py @@ -7011,6 +7011,8 @@ def test_node_destinations() -> None: Edge(source="__start__", target="child", data=None, conditional=False), Edge(source="child", target="node_b", data=None, conditional=True), Edge(source="child", target="node_c", data=None, conditional=True), + Edge(source="node_b", target="__end__", data=None, conditional=False), + Edge(source="node_c", target="__end__", data=None, conditional=False), ] == graph.edges # destinations w/ dicts @@ -7029,6 +7031,8 @@ def test_node_destinations() -> None: Edge(source="__start__", target="child", data=None, conditional=False), Edge(source="child", target="node_b", data="foo", conditional=True), Edge(source="child", target="node_c", data="bar", conditional=True), + Edge(source="node_b", target="__end__", data=None, conditional=False), + Edge(source="node_c", target="__end__", data=None, conditional=False), ] == graph.edges diff --git a/libs/langgraph/tests/test_pregel_async.py b/libs/langgraph/tests/test_pregel_async.py index 0ce67dc10..9a32eab60 100644 --- a/libs/langgraph/tests/test_pregel_async.py +++ b/libs/langgraph/tests/test_pregel_async.py @@ -3932,15 +3932,21 @@ async def test_max_concurrency_control(checkpointer_name: str) -> None: if checkpointer_name == "memory": assert ( graph.get_graph().draw_mermaid() - == """%%{init: {'flowchart': {'curve': 'linear'}}}%% + == """--- +config: + flowchart: + curve: linear +--- graph TD; __start__([

__start__

]):::first 1(1) 2(2) - 3([3]):::last - __start__ --> 1; + 3(3) + __end__([

__end__

]):::last 1 -.-> 2; 2 -.-> 3; + __start__ --> 1; + 3 --> __end__; classDef default fill:#f2f0ff,line-height:1.2 classDef first fill-opacity:0 classDef last fill:#bfb6fc