def extract_step_data(step):
 step_data = {'name': step.sentence, 'duration': _get_duration(step), 'meta': {'success': bool(step.passed), 'failed': bool(step.failed), 'skipped': ((not step.passed) and (not step.failed) and step.has_definition), 'undefined': (not step.has_definition)}, 'failure': {}}
 if step.why:
  step_data['failure'] = {'exception': repr(step.why.exception), 'traceback': step.why.traceback}
 return step_data

def extract_step_data ( step ) : step_data = { 'name' : step . sentence , 'duration' : _get_duration ( step ) , 'meta' : { 'success' : bool ( step . passed ) , 'failed' : bool ( step . failed ) , 'skipped' : ( ( not step . passed ) and ( not step . failed ) and step . has_definition ) , 'undefined' : ( not step . has_definition ) } , 'failure' : { } } if step . why : step_data [ 'failure' ] = { 'exception' : repr ( step . why . exception ) , 'traceback' : step . why . traceback } return step_data
extract data from a step instance .