#NEWLINE# def test_run_runs_named_scenarios( self ) : #NEWLINE# #INDENT# scenarios = [ Mock ( Scenario ) , Mock ( Scenario ) ] #NEWLINE# scenarios [ 0 ] . name = 'first scenario' #NEWLINE# scenarios [ 1 ] . name = 'second scenario' #NEWLINE# scenarios [ 0 ] . tags = [ ] #NEWLINE# scenarios [ 1 ] . tags = [ ] #NEWLINE# scenarios [ 0 ] . should_run_with_name_select . return_value = True #NEWLINE# scenarios [ 1 ] . should_run_with_name_select . return_value = False #NEWLINE# for scenario in scenarios : #NEWLINE# #INDENT# scenario . run . return_value = False #NEWLINE# #UNINDENT# self . config . tags . check . return_value = True #NEWLINE# self . config . name = [ 'first' , 'third' ] #NEWLINE# self . config . name_re = Configuration . build_name_re ( self . config . name ) #NEWLINE# feature = Feature ( 'foo.feature' , 1 , 'Feature' , 'foo' , scenarios = scenarios ) #NEWLINE# feature . run ( self . runner ) #NEWLINE# scenarios [ 0 ] . run . assert_called_with ( self . runner ) #NEWLINE# assert ( not scenarios [ 1 ] . run . called ) #NEWLINE# scenarios [ 0 ] . should_run_with_name_select . assert_called_with ( self . config ) #NEWLINE# scenarios [ 1 ] . should_run_with_name_select . assert_called_with ( self . config )