def assert_has_line(output, line):
 match = re.search(('^%s$' % re.escape(line)), output, flags=re.MULTILINE)
 assert (match is not None), ("No line of output file was '%s' (output was '%s') " % (line, output))

def assert_has_line ( output , line ) : match = re . search ( ( '^%s$' % re . escape ( line ) ) , output , flags = re . MULTILINE ) assert ( match is not None ) , ( "No line of output file was '%s' (output was '%s') " % ( line , output ) )
asserts the specified output contains the line specified the argument line .