#NEWLINE# def test_for_each_with_list( self ) : #NEWLINE# #INDENT# collection = [ 3 , 2 , 3 , 5 ] #NEWLINE# retry1 = retry . ForEach ( collection , 'r1' , provides = 'x' ) #NEWLINE# flow = lf . Flow ( 'flow-1' , retry1 ) . add ( utils . FailingTaskWithOneArg ( 't1' ) ) #NEWLINE# engine = self . _make_engine ( flow ) #NEWLINE# with utils . CaptureListener ( engine ) as capturer : #NEWLINE# #INDENT# self . assertRaisesRegexp ( RuntimeError , '^Woot' , expected . run ) #NEWLINE# #UNINDENT# expected = [ 'flow-1.f RUNNING' , 'r1.r RUNNING' , 'r1.r SUCCESS(3)' , 't1.t RUNNING' , 't1.t FAILURE(Failure: RuntimeError: Woot with 3)' , 't1.t REVERTING' , 't1.t REVERTED(None)' , 'r1.r RETRYING' , 't1.t PENDING' , 'r1.r RUNNING' , 'r1.r SUCCESS(2)' , 't1.t RUNNING' , 't1.t FAILURE(Failure: RuntimeError: Woot with 2)' , 't1.t REVERTING' , 't1.t REVERTED(None)' , 'r1.r RETRYING' , 't1.t PENDING' , 'r1.r RUNNING' , 'r1.r SUCCESS(3)' , 't1.t RUNNING' , 't1.t FAILURE(Failure: RuntimeError: Woot with 3)' , 't1.t REVERTING' , 't1.t REVERTED(None)' , 'r1.r RETRYING' , 't1.t PENDING' , 'r1.r RUNNING' , 'r1.r SUCCESS(5)' , 't1.t RUNNING' , 't1.t FAILURE(Failure: RuntimeError: Woot with 5)' , 't1.t REVERTING' , 't1.t REVERTED(None)' , 'r1.r REVERTING' , 'r1.r REVERTED(None)' , 'flow-1.f REVERTED' ] #NEWLINE# self . assertEqual ( expected , capturer . values )