#NEWLINE# def test_run_graph_flow_decider_revert( self ) : #NEWLINE# #INDENT# flow = gf . Flow ( 'g' ) #NEWLINE# a = utils . NoopTask ( 'a' ) #NEWLINE# b = utils . NoopTask ( 'b' ) #NEWLINE# c = utils . FailingTask ( 'c' ) #NEWLINE# flow . add ( a , b , c ) #NEWLINE# flow . link ( a , b , decider = ( lambda history : False ) , decider_depth = 'atom' ) #NEWLINE# flow . link ( b , c ) #NEWLINE# e = self . _make_engine ( flow ) #NEWLINE# with utils . CaptureListener ( e , capture_flow = False ) as capturer : #NEWLINE# #INDENT# self . assertRaises ( ( RuntimeError , exc . WrappedFailure ) , e . run ) #NEWLINE# #UNINDENT# expected = [ 'a.t RUNNING' , 'a.t SUCCESS(None)' , 'b.t IGNORE' , 'c.t RUNNING' , 'c.t FAILURE(Failure: RuntimeError: Woot!)' , 'c.t REVERTING' , 'c.t REVERTED(None)' , 'a.t REVERTING' , 'a.t REVERTED(None)' ] #NEWLINE# self . assertEqual ( expected , capturer . values )