def assert_html_equal(got, want): checker = LHTML5OutputChecker() if not checker.check_output(want, got, 0): message = checker.output_difference(Example("", want), got, 0) raise AssertionError(message)