def _formatSteps(self, test, failed_step, failure=True): ret = [] ret.append(FreshenPrettyPrint.feature(test.test.feature)) ret.append(FreshenPrettyPrint.scenario(test.test.scenario)) found = False for step in test.test.scenario.iter_steps(): if step == failed_step: found = True if failure: ret.append(FreshenPrettyPrint.step_failed(step)) else: ret.append(FreshenPrettyPrint.step_undefined(step)) elif found: ret.append(FreshenPrettyPrint.step_notrun(step)) else: ret.append(FreshenPrettyPrint.step_passed(step)) return "\n".join(ret)
def step_failed(self, step, e): print FreshenPrettyPrint.step_failed(step)