#NEWLINE# def test_execute_failed( self ) : #NEWLINE# #INDENT# task = Task ( retries = 3 , async = True ) #NEWLINE# task . to_call ( fail_task , 2 , 7 ) #NEWLINE# self . assertEqual ( task . status , WAITING ) #NEWLINE# try : #NEWLINE# #INDENT# self . gator . execute ( self ) #NEWLINE# self . assertEqual ( task . status , RETRYING ) #NEWLINE# self . gator . execute ( task ) #NEWLINE# self . gator . execute ( task ) #NEWLINE# self . gator . execute ( task ) #NEWLINE# self . fail ( ) #NEWLINE# #UNINDENT# except IOError : #NEWLINE# #INDENT# self . assertEqual ( task . retries , 0 ) #NEWLINE# self . assertEqual ( task . status , FAILED )