@mock.patch('traceback.format_exception', wraps=fake_format_exception)
    def test_frame_stripping(self, mock_format_exception):
        test_result = TestResult(lambda: 'wat', runner_id='foo!')
        test_result.start()

        root_tb = tb = mock.Mock()
        testify_frames = [True, True, False, True, False, True, True]
        for testify_frame in testify_frames:
            tb.tb_next = mock.Mock()
            tb = tb.tb_next
            f_globals = {'__testify': True} if testify_frame else {}
            tb.configure_mock(**{'tb_frame.f_globals': f_globals})
        tb.tb_next = None
        tb = root_tb.tb_next

        test_result.end_in_failure((AssertionError, 'wat', tb))

        formatted = test_result.format_exception_info()
        assert_equal(formatted, 'Traceback: AssertionError\n')

        # It should format three frames of the stack, starting with the third frame.
        mock_format_exception.assert_called_with(AssertionError, 'wat', tb.tb_next.tb_next, 3)
remain only entries without specified tags
dataset/ETHPy150Open Yelp/Testify/test/test_result_test.py/TestResultTestCase.test_frame_stripping--crossover with--dataset/ETHPy150Open nathangrigg/dayone_export/dayone_export/__init__.py/_exclude_tags