def assert_has_text_matching(output, expression):
 match = re.search(expression, output)
 assert (match is not None), ("No text matching expression '%s' was found in output file." % expression)

def assert_has_text_matching ( output , expression ) : match = re . search ( expression , output ) assert ( match is not None ) , ( "No text matching expression '%s' was found in output file." % expression )
asserts the specified output contains text matching the regular expression specified by the argument expression .