def test_format_exception_only_bad__str__(self):
        class X(Exception):
            def __str__(self):
                1/0
        err = traceback.format_exception_only(X, X())
        self.assertEqual(len(err), 1)
        str_value = '<unprintable %s object>' % X.__name__
        self.assertEqual(err[0], X.__name__ + ': ' + str_value + '\n')
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_traceback.py/TracebackCases.test_format_exception_only_bad__str__/original