#NEWLINE# def test_failed_reset_run_again( self ) : #NEWLINE# #INDENT# task1 = utils . ProgressingTask ( name = 'task1' ) #NEWLINE# task2 = utils . ProgressingTask ( name = 'task2' ) #NEWLINE# task3 = utils . FailingTask ( name = 'task3' ) #NEWLINE# flow = lf . Flow ( 'root' ) #NEWLINE# flow . add ( task1 , task2 , task3 ) #NEWLINE# engine = self . _make_engine ( flow ) #NEWLINE# with utils . CaptureListener ( engine , capture_flow = False ) as capturer : #NEWLINE# #INDENT# self . assertRaises ( ( RuntimeError , exc . WrappedFailure ) , engine . run ) #NEWLINE# #UNINDENT# expected = [ 'task1.t RUNNING' , 'task1.t SUCCESS(5)' , 'task2.t RUNNING' , 'task2.t SUCCESS(5)' , 'task3.t RUNNING' , 'task3.t FAILURE(Failure: RuntimeError: Woot!)' , 'task3.t REVERTING' , 'task3.t REVERTED(None)' , 'task2.t REVERTING' , 'task2.t REVERTED(None)' , 'task1.t REVERTING' , 'task1.t REVERTED(None)' ] #NEWLINE# self . assertEqual ( expected , task1 . values ) #NEWLINE# engine . reset ( ) #NEWLINE# with utils . CaptureListener ( engine , capture_flow = False ) as capturer : #NEWLINE# #INDENT# self . assertRaises ( ( RuntimeError , exc . WrappedFailure ) , engine . run ) #NEWLINE# #UNINDENT# self . assertEqual ( expected , capturer . values )