@staticmethod
    def report_errors(audit, url):
        """
        Args:

            audit: results of `AxeCoreAudit.do_audit()`.
            url: the url of the page being audited.

        Raises: `AccessibilityError`
        """
        errors = AxeCoreAudit.get_errors(audit)
        if errors["total"] > 0:
            msg = "URL '{}' has {} errors:\n\n{}".format(
                url,
                errors["total"],
                AxeCoreAudit.format_errors(errors["errors"])
            )
            raise AccessibilityError(msg)
dataset/ETHPy150Open edx/bok-choy/bok_choy/a11y/axe_core_ruleset.py/AxeCoreAudit.report_errors/original