def get_html_label(self, build):
        link = build_uri('/projects/{0}/builds/{1}/tests/?result=failed'.format(build.project.slug, build.id.hex))

        try:
            test_failures = (
                s.value for s in build.stats if s.name == 'test_failures'
            ).next()
        except __HOLE__:
            return Markup('There were an <a href="{link}">unknown number of test failures</a>.'.format(
                link=link,
            ))

        return Markup('There were <a href="{link}">{count} failing tests</a>.'.format(
            link=link,
            count=test_failures,
        ))
dataset/ETHPy150Open dropbox/changes/changes/buildfailures/testfailure.py/TestFailure.get_html_label