Make test deterministic

This commit is contained in:
Nuno Campos
2024-04-18 08:40:56 -07:00
parent 49cced4f92
commit 9e6fc78ac2
2 changed files with 28 additions and 44 deletions
+27 -43
View File
@@ -95,16 +95,6 @@
"source": "left",
"target": "condition"
},
{
"source": "condition",
"target": "left",
"data": "left"
},
{
"source": "condition",
"target": "right",
"data": "right"
},
{
"source": "condition",
"target": "__end__",
@@ -116,39 +106,33 @@
# ---
# name: test_conditional_entrypoint_graph.3
'''
+-----------+
| __start__ |
+-----------+
*
*
*
+--------------+
| should_start |
+--------------+
** **
** **
* **
+------+ *
| left | *
+------+ *
* *
* *
* *
+-----------+ *
| condition | *
+-----------+*** *
* *** *
* **** *
* ** *
* +-------+
** | right |
** +-------+
** **
** **
* *
+---------+
| __end__ |
+---------+
+-----------+
| __start__ |
+-----------+
*
*
*
+--------------+
| should_start |
+--------------+
* **
** *
* **
+------+ *
| left | *
+------+ *
* *
* *
* *
+-----------+ +-------+
| condition | | right |
+-----------+ +-------+
* *
** **
* *
+---------+
| __end__ |
+---------+
'''
# ---
# name: test_conditional_entrypoint_graph_state
+1 -1
View File
@@ -1367,7 +1367,7 @@ def test_conditional_entrypoint_graph(snapshot: SnapshotAssertion) -> None:
should_start, {"go-left": "left", "go-right": "right"}
)
workflow.add_conditional_edges("left", lambda data: END)
workflow.add_conditional_edges("left", lambda data: END, {END: END})
workflow.add_edge("right", END)
app = workflow.compile()