@with_setup(prepare_stdout)
def test_run_only_fast_tests():
 from lettuce import step
 good_one = Mock()
 bad_one = Mock()
 @step('I wait for 0 seconds')
 def wait_for_0_seconds(step):
  good_one(step.sentence)
 @step('the time passed is 0 seconds')
 def time_passed_0_sec(step):
  good_one(step.sentence)
 @step('I wait for 60 seconds')
 def wait_for_60_seconds(step):
  bad_one(step.sentence)
 @step('the time passed is 1 minute')
 def time_passed_1_min(step):
  bad_one(step.sentence)
 filename = tag_feature_name('timebound')
 runner = Runner(filename, verbosity=1, tags=['fast-ish'])
 runner.run()
 assert_stdout_lines('.\n1 feature (1 passed)\n1 scenario (1 passed)\n2 steps (2 passed)\n')

@ with_setup ( prepare_stdout ) def test_run_only_fast_tests ( ) : from lettuce import step good_one = Mock ( ) bad_one = Mock ( ) @ step ( 'I wait for 0 seconds' ) def wait_for_0_seconds ( step ) : good_one ( step . sentence ) @ step ( 'the time passed is 0 seconds' ) def time_passed_0_sec ( step ) : good_one ( step . sentence ) @ step ( 'I wait for 60 seconds' ) def wait_for_60_seconds ( step ) : bad_one ( step . sentence ) @ step ( 'the time passed is 1 minute' ) def time_passed_1_min ( step ) : bad_one ( step . sentence ) filename = tag_feature_name ( 'timebound' ) runner = Runner ( filename , verbosity = 1 , tags = [ 'fast-ish' ] ) runner . run ( ) assert_stdout_lines ( '.\n1 feature (1 passed)\n1 scenario (1 passed)\n2 steps (2 passed)\n' )
runner can filter by tags .