def assert_html_equal(actual_html, expected_html, filename=None):
    if not html_is_equal(actual_html, expected_html):
        try:
            html = prettify(actual_html)
        except ExpatError:
            html = actual_html
        if filename:
            with open('tests/failures/%s.html' % filename, 'w') as f:
                f.write(html)
        raise AssertionError(html)
dataset/ETHPy150Open CenterForOpenScience/pydocx/pydocx/test/utils.py/assert_html_equal/original