@before.each_scenario
def process_requires_tags(scenario):
 tag_re = re.compile('requires_stub_(?P<server>[^_]+)')
 for tag in scenario.tags:
  requires = tag_re.match(tag)
  if requires:
   if (requires.group('server') == 'youtube'):
    if (not is_youtube_available(YOUTUBE_API_URLS)):
     scenario.steps = []
     return
   start_stub(requires.group('server'))

@ before . each_scenario def process_requires_tags ( scenario ) : tag_re = re . compile ( 'requires_stub_(?P<server>[^_]+)' ) for tag in scenario . tags : requires = tag_re . match ( tag ) if requires : if ( requires . group ( 'server' ) == 'youtube' ) : if ( not is_youtube_available ( YOUTUBE_API_URLS ) ) : scenario . steps = [ ] return start_stub ( requires . group ( 'server' ) )
process the scenario tags to make sure that any requirements are met prior to that scenario being executed .