def METHOD_NAME(self):
    class Foo(object):
        def __repr__(self):
            raise Exception('broken!')
    self.assert_equal(
        debug_repr(Foo()),
        u'<span class="brokenrepr">&lt;broken repr (Exception: '
        u'broken!)&gt;</span>')