@@ -24,6 +24,15 @@ def generator_function(context):
2424
2525 return outputs
2626
27+ def generator_function_multi_yield_when_all (context ):
28+ outputs = []
29+
30+ task1 = context .call_activity ("Hello" , "Tokyo" )
31+ yield context .task_all ([task1 ])
32+ result = yield context .task_all ([task1 ])
33+
34+ return result
35+
2736def generator_function_is_replaying (context ):
2837 outputs = []
2938
@@ -297,6 +306,22 @@ def test_tokyo_and_seattle_and_london_state():
297306 assert_valid_schema (result )
298307 assert_orchestration_state_equals (expected , result )
299308
309+ def test_multi_when_all_yield ():
310+ context_builder = ContextBuilder ('test_simple_function' )
311+ add_hello_completed_events (context_builder , 0 , "\" Hello Tokyo!\" " )
312+
313+ result = get_orchestration_state_result (
314+ context_builder , generator_function_multi_yield_when_all )
315+
316+ expected_state = base_expected_state (
317+ ['Hello Tokyo!' ])
318+ add_hello_action (expected_state , 'Tokyo' )
319+ expected_state ._is_done = True
320+ expected = expected_state .to_json ()
321+
322+ assert_valid_schema (result )
323+ assert_orchestration_state_equals (expected , result )
324+
300325def test_sequential_is_replaying ():
301326 context_builder = ContextBuilder ('test_simple_function' , is_replaying = True )
302327 add_hello_completed_events (context_builder , 0 , "\" Hello Tokyo!\" " , True )
0 commit comments