'If a class raises an exception when accessing its C{__name__} attribute
B{and} when calling its C{__str__} implementation, L{reflect.safe_repr}
returns \'BROKEN CLASS\' instead of the class name.'

def test_brokenClassNameAttribute(self):

    class X(BTBase, ):
        breakName = True
    xRepr = reflect.safe_repr(X())
    self.assertIn('<BROKEN    CLASS    AT    0x', xRepr)
    self.assertIn(os.path.splitext(__file__)[0], xRepr)
    self.assertIn('RuntimeError:    repr!', xRepr)
