def _assertTransformsTo(self, input, expected):
     # compare two chunks of HTML ignoring whitespace differences,
     # and with a useful diff on failure
     out = self.parser(input)
     normalized_out = normalize_html(out)
     normalized_expected = normalize_html(expected)
     try:
         self.assertTrue(_ellipsis_match(normalized_expected,
                                         normalized_out))
     except AssertionError:
         class wrapper(object):
             want = expected
         raise AssertionError(self.outputchecker.output_difference(
             wrapper, out, REPORT_NDIFF))
Esempio n. 2
0
 def _assertTransformsTo(self, input, expected):
     # compare two chunks of HTML ignoring whitespace differences,
     # and with a useful diff on failure
     out = self.parser(input)
     normalized_out = normalize_html(out)
     normalized_expected = normalize_html(expected)
     try:
         self.assertTrue(_ellipsis_match(normalized_expected,
                                         normalized_out))
     except AssertionError:
         class wrapper(object):
             want = expected
         raise AssertionError(self.outputchecker.output_difference(
                 wrapper, out, REPORT_NDIFF))