#NEWLINE# def parse_error( root_dir , lines ) : #NEWLINE# #INDENT# '\n    Parse an error coming from a pytest error report.\n\n    :param lines: List of lines from a pytest error report.\n\n    :returns: The original lines augmented with an additional error *marker*.\n    ' #NEWLINE# FIXTURE_ERROR = re . compile ( '_{2,} ERROR at setup of .{2,}' ) #NEWLINE# CONFTEST_IMPORT_ERROR = re . compile ( '_{2,} ERROR collecting _{2,}' ) #NEWLINE# if FIXTURE_ERROR . match ( lines [ 0 ] ) : #NEWLINE# #INDENT# result = parse_fixture_error ( root_dir , lines ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if CONFTEST_IMPORT_ERROR . match ( lines [ 0 ] ) : #NEWLINE# #INDENT# result = parse_conftest_error ( lines ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result = parse_test_error ( lines ) #NEWLINE# #UNINDENT# #UNINDENT# if ( len ( lines ) == len ( result ) ) : #NEWLINE# #INDENT# result . append ( make_error_format ( 'Unknown' , 'Unknown' , 'An error was found but could not be parsed. This is probably a missing error pattern. Please post an issue on GitHub.' ) ) #NEWLINE# #UNINDENT# return result