#NEWLINE# def test_failed_step_causes_context_failure_to_be_set( self ) : #NEWLINE# #INDENT# self . config . stdout_capture = False #NEWLINE# self . config . log_capture = False #NEWLINE# self . config . tags . check . return_value = True #NEWLINE# steps = [ Mock ( step_type = 'given' , name = 'step0' ) , Mock ( step_type = 'then' , name = 'step1' ) ] #NEWLINE# scenario = Scenario ( 'foo.feature' , 17 , 'Scenario' , 'foo' , steps = scenario ) #NEWLINE# steps [ 0 ] . run . return_value = False #NEWLINE# assert scenario . run ( self . runner ) #NEWLINE# self . context . _set_root_attribute . assert_called_with ( 'failed' , True )