@with_setup(prepare_stdout)
def test_blank_step_hash_value():
 from lettuce import step
 @step('ignore step')
 def ignore_step(step):
  pass
 @step('string length calc')
 def string_lenth_calc(step):
  for hash in step.hashes:
   if ((len(hash['string']) + len(hash['string2'])) != int(hash['length'])):
    raise AssertionError('fail')
 filename = syntax_feature_name('blank_values_in_hash')
 runner = Runner(filename, verbosity=1)
 runner.run()
 assert_stdout_lines('.\n1 feature (1 passed)\n1 scenario (1 passed)\n4 steps (4 passed)\n')

@ with_setup ( prepare_stdout ) def test_blank_step_hash_value ( ) : from lettuce import step @ step ( 'ignore step' ) def ignore_step ( step ) : pass @ step ( 'string length calc' ) def string_lenth_calc ( step ) : for hash in step . hashes : if ( ( len ( hash [ 'string' ] ) + len ( hash [ 'string2' ] ) ) != int ( hash [ 'length' ] ) ) : raise AssertionError ( 'fail' ) filename = syntax_feature_name ( 'blank_values_in_hash' ) runner = Runner ( filename , verbosity = 1 ) runner . run ( ) assert_stdout_lines ( '.\n1 feature (1 passed)\n1 scenario (1 passed)\n4 steps (4 passed)\n' )
syntax checking: blank in step hash column = empty string .