<s> from __future__ import absolute_import <EOL> from jinja2 import Markup <EOL> from changes . buildfailures . base import BuildFailure <EOL> from changes . utils . http import build_uri <EOL> class TestFailure ( BuildFailure ) : <EOL> def get_html_label ( self , build ) : <EOL> link = build_uri ( '<STR_LIT>' . format ( build . project . slug , build . id . hex ) ) <EOL> try : <EOL> test_failures = ( <EOL> s . value for s in build . stats if s . name == '<STR_LIT>' <EOL> ) . next ( ) <EOL> except StopIteration : <EOL> return Markup ( '<STR_LIT>' . format ( <EOL> link = link , <EOL> ) ) <EOL> return Markup ( '<STR_LIT>' . format ( <EOL> link = link , <EOL> count = test_failures , <EOL> ) ) </s>
