

@mock.patch('traceback.format_exception', wraps=fake_format_exception)
def test_format_exception_info_multiple(self, mock_format_exception):

    class Error1(Exception):
        pass

    class Error2(Exception):
        pass
    (value1, tb1) = self._append_exc_info(Error1)
    (value2, tb2) = self._append_exc_info(Error2)
    formatted = self.test_result.format_exception_info()
    mock_format_exception.assert_has_calls([mock.call(Error1, value1, tb1, None), mock.call(Error2, value2, tb2, None)])
    assert_equal(formatted, 'Traceback: Error1\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback: Error2\n')

dataset/ETHPy150Open Yelp/Testify/test/test_result_test.py TestResultTestCase.test_format_exception_info_multiple/original