#NEWLINE# def assert_and_parse_html( self , html , user_msg , msg ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# dom = parse_html ( html ) #NEWLINE# #UNINDENT# except HTMLParseError as e : #NEWLINE# #INDENT# standardMsg = ( '%s\n%s' % ( msg , e . msg ) ) #NEWLINE# self . fail ( self . _formatMessage ( user_msg , standardMsg ) ) #NEWLINE# #UNINDENT# return dom