#NEWLINE# def pytest_runtest_logreport( self , report ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# scenario = report . scenario #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( ( not scenario [ 'steps' ] ) or ( report . when != 'call' ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# def stepmap( step ) : #NEWLINE# #INDENT# error_message = False #NEWLINE# if ( step [ 'failed' ] and ( not scenario . setdefault ( 'failed' , False ) ) ) : #NEWLINE# #INDENT# scenario [ 'failed' ] = True #NEWLINE# error_message = True #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'keyword' : step [ 'keyword' ] , #NEWLINE# 'name' : step [ 'name' ] , #NEWLINE# 'line' : step [ 'line_number' ] , #NEWLINE# 'match' : { #NEWLINE# #INDENT# 'location' : '' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'result' : self . _get_result ( step , report , error_message ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( scenario [ 'feature' ] [ 'filename' ] not in self . features ) : #NEWLINE# #INDENT# self . features [ scenario [ 'feature' ] [ 'filename' ] ] = { #NEWLINE# #INDENT# 'keyword' : 'Feature' , #NEWLINE# 'uri' : scenario [ 'feature' ] [ 'rel_filename' ] , #NEWLINE# 'name' : ( scenario [ 'feature' ] [ 'name' ] or scenario [ 'feature' ] [ 'rel_filename' ] ) , #NEWLINE# 'id' : scenario [ 'feature' ] [ 'rel_filename' ] . lower ( ) . replace ( ' ' , '-' ) , #NEWLINE# 'line' : report [ 'feature' ] [ 'line_number' ] , #NEWLINE# 'description' : scenario [ 'feature' ] [ 'description' ] , #NEWLINE# 'tags' : self . _serialize_tags ( scenario [ 'feature' ] ) , #NEWLINE# 'elements' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# self . features [ scenario [ 'feature' ] [ 'filename' ] ] [ 'elements' ] . append ( { #NEWLINE# #INDENT# 'keyword' : 'Scenario' , #NEWLINE# 'id' : report . item [ 'name' ] , #NEWLINE# 'name' : scenario [ 'name' ] , #NEWLINE# 'line' : scenario [ 'line_number' ] , #NEWLINE# 'description' : '' , #NEWLINE# 'tags' : self . _serialize_tags ( scenario ) , #NEWLINE# 'type' : 'scenario' , #NEWLINE# 'steps' : [ stepmap ( step ) for step in scenario [ 'steps' ] ] , #NEWLINE# #UNINDENT# } )