@with_setup(step_runner_environ)
def test_steps_that_match_named_groups_takes_them_as_parameters():
 @step('When a (?P<what>\\w+) at "(?P<city>.*)"')
 def given_action_named(step, what, city):
  assert_equals(what, 'foreign')
  assert_equals(city, 'Rio de Janeiro')
 f = Feature.from_string(FEATURE5)
 feature_result = f.run()
 scenario_result = feature_result.scenario_results[0]
 assert_equals(len(scenario_result.steps_passed), 1)
 assert_equals(scenario_result.total_steps, 1)

@ with_setup ( step_runner_environ ) def test_steps_that_match_named_groups_takes_them_as_parameters ( ) : @ step ( 'When a (?P<what>\\w+) at "(?P<city>.*)"' ) def given_action_named ( step , what , city ) : assert_equals ( what , 'foreign' ) assert_equals ( city , 'Rio de Janeiro' ) f = Feature . from_string ( FEATURE5 ) feature_result = f . run ( ) scenario_result = feature_result . scenario_results [ 0 ] assert_equals ( len ( scenario_result . steps_passed ) , 1 ) assert_equals ( scenario_result . total_steps , 1 )
steps that match named groups takes them as parameters .