File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -379,9 +379,8 @@ def test_engine_timeout_context_no_timeout(self):
379379 task = task , workflow_id = self .workflow_id , previous_context = Context ()
380380 )
381381
382- with engine .start ():
383- with engine .timeout_context (seconds = 0 ):
384- engine .execute ()
382+ with engine .start (), engine .timeout_context (seconds = 0 ):
383+ engine .execute ()
385384
386385 self .assertEqual (task .status , TypeStatus .COMPLETED )
387386
@@ -391,9 +390,8 @@ def test_engine_timeout_context_with_timeout(self):
391390 task = task , workflow_id = self .workflow_id , previous_context = Context ()
392391 )
393392
394- with engine .start ():
395- with engine .timeout_context (seconds = 10 ):
396- pass
393+ with engine .start (), engine .timeout_context (seconds = 10 ):
394+ pass
397395
398396 self .assertEqual (task .status , TypeStatus .COMPLETED )
399397
@@ -403,9 +401,8 @@ def test_engine_checkpoint_context(self):
403401 task = task , workflow_id = self .workflow_id , previous_context = Context ()
404402 )
405403
406- with engine .start ():
407- with engine .checkpoint_context ():
408- engine .execute ()
404+ with engine .start (), engine .checkpoint_context ():
405+ engine .execute ()
409406
410407 self .assertEqual (task .status , TypeStatus .COMPLETED )
411408 self .assertIsNotNone (task .current_context )
You canβt perform that action at this time.
0 commit comments