From 01e5ecedfd6c06abed7f11ec506f8d775314d36f Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Mon, 30 Dec 2024 19:26:18 +0000 Subject: [PATCH] Remove assertion of order --- libs/langgraph/tests/test_pregel_async.py | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/libs/langgraph/tests/test_pregel_async.py b/libs/langgraph/tests/test_pregel_async.py index 5122d9cec..1bdc051b6 100644 --- a/libs/langgraph/tests/test_pregel_async.py +++ b/libs/langgraph/tests/test_pregel_async.py @@ -284,21 +284,25 @@ async def test_checkpoint_put_after_cancellation() -> None: await asyncio.sleep(0.2) t.cancel() # check logs before cancellation is handled - assert logs == [ - "checkpoint.aput.start", - "awhile.start", - ], "Cancelled before checkpoint put started" + assert logs == sorted( + [ + "checkpoint.aput.start", + "awhile.start", + ] + ), "Cancelled before checkpoint put started" # wait for task to finish try: await t except asyncio.CancelledError: # check logs after cancellation is handled - assert logs == [ - "checkpoint.aput.start", - "awhile.start", - "awhile.end", - "checkpoint.aput.end", - ], "Checkpoint put is not cancelled" + assert logs == sorted( + [ + "checkpoint.aput.start", + "awhile.start", + "awhile.end", + "checkpoint.aput.end", + ] + ), "Checkpoint put is not cancelled" else: assert False, "Task should be cancelled"