def test_scenario_outlines_within_feature():
 feature = Feature.from_string(OUTLINED_FEATURE)
 scenario = feature.scenarios[0]
 assert_equals(len(scenario.solved_steps), 12)
 expected_sentences = ['Given I have entered 20 into the calculator', 'And I have entered 30 into the calculator', 'When I press add', 'Then the result should be 50 on the screen', 'Given I have entered 2 into the calculator', 'And I have entered 5 into the calculator', 'When I press add', 'Then the result should be 7 on the screen', 'Given I have entered 0 into the calculator', 'And I have entered 40 into the calculator', 'When I press add', 'Then the result should be 40 on the screen']
 for (step, expected_sentence) in zip(scenario.solved_steps, expected_sentences):
  assert_equals(type(step), Step)
  assert_equals(step.sentence, expected_sentence)

def test_scenario_outlines_within_feature ( ) : feature = Feature . from_string ( OUTLINED_FEATURE ) scenario = feature . scenarios [ 0 ] assert_equals ( len ( scenario . solved_steps ) , 12 ) expected_sentences = [ 'Given I have entered 20 into the calculator' , 'And I have entered 30 into the calculator' , 'When I press add' , 'Then the result should be 50 on the screen' , 'Given I have entered 2 into the calculator' , 'And I have entered 5 into the calculator' , 'When I press add' , 'Then the result should be 7 on the screen' , 'Given I have entered 0 into the calculator' , 'And I have entered 40 into the calculator' , 'When I press add' , 'Then the result should be 40 on the screen' ] for ( step , expected_sentence ) in zip ( scenario . solved_steps , expected_sentences ) : assert_equals ( type ( step ) , Step ) assert_equals ( step . sentence , expected_sentence )
solving scenario outlines within a feature .