From e79ed7e9fd645ec9047ff47e7f5503e825b0eca6 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 10 Oct 2024 15:52:31 -0400 Subject: [PATCH] Wait for context manager to close before operating on warnings --- tests/worker/test_workflow.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/worker/test_workflow.py b/tests/worker/test_workflow.py index 15afe8c4..06d880e6 100644 --- a/tests/worker/test_workflow.py +++ b/tests/worker/test_workflow.py @@ -5672,11 +5672,11 @@ async def _run_workflow_and_get_warning(self) -> bool: == "Deliberately failing post-ContinueAsNew run" ) - unfinished_handler_warning_emitted = any( - issubclass(w.category, self._unfinished_handler_warning_cls) - for w in warnings - ) - return unfinished_handler_warning_emitted + unfinished_handler_warning_emitted = any( + issubclass(w.category, self._unfinished_handler_warning_cls) + for w in warnings + ) + return unfinished_handler_warning_emitted @property def _unfinished_handler_warning_cls(self) -> Type: