

def test_run_call_order__error_in_test(self):
    events = []
    result = LoggingResult(events)

    def setUp():
        events.append('setUp')

    def test():
        events.append('test')
        raise RuntimeError('raised by test')

    def tearDown():
        events.append('tearDown')
    expected = ['startTest', 'setUp', 'test', 'addError', 'tearDown', 'stopTest']
    unittest2.FunctionTestCase(test, setUp, tearDown).run(result)
    self.assertEqual(self, expected)

dataset/ETHPy150Open CVL-dev/cvl-fabric-launcher/pyinstaller-2.1/PyInstaller/lib/unittest2/test/test_functiontestcase.py Test_FunctionTestCase.test_run_call_order__error_in_test/VarMisuse@112/163 `events`->`self`