def skip_step(step, resource=None, message=None): if resource is None: resource = 'any' if message is None: message = '{} {} {}'.format(Defaults().yellow('Can not find'), Defaults().green(resource), Defaults().yellow('defined in target terraform plan.')) e_message = 'Can not find {} defined in target terraform plan.'.format(resource) else: e_message = message message = Defaults().yellow(message) if step.context.no_skip: if -1 in step.context.lines_to_noskip or step.line in step.context.lines_to_noskip: message = Defaults().failure_colour(message) Error(step, e_message) return if str(world.config.formatter) in ('gherkin'): console_write("\t{} {}: {}".format(Defaults().info_icon, Defaults().skip_colour('SKIPPING'), message.format(resource=Defaults().green(resource))) ) step.skip() # Skip all steps in the scenario for each in step.parent.all_steps: each.runable = False
def skip_step(step, resource=None, message=None): if resource is None: resource = 'any' if message is None: message = '{} {} {}'.format(Defaults().yellow('Can not find'), Defaults().green(resource), Defaults().yellow('defined in target terraform plan.')) else: message = Defaults().yellow(message) if str(world.config.formatter) in ('gherkin'): console_write("\t{} {}: {}".format(Defaults().info_icon, Defaults().skip_colour('SKIPPING'), message.format(resource=Defaults().green(resource))) ) step.skip() # Skip all steps in the scenario for each in step.parent.all_steps: each.runable = False