def test_shouldStop(self):
        called = []
        class MockTest(unittest.TestCase):
            def test_foo1(test):
                called.append(1)
            def test_foo2(test):
                raise KeyboardInterrupt()
            def test_foo3(test):
                called.append(2)
        result = reporter.TestResult()
        loader = runner.TestLoader()
        loader.suiteFactory = runner.DestructiveTestSuite
        suite = loader.loadClass(MockTest)
        self.assertEquals(called, [])
        suite.run(result)
        self.assertEquals(called, [1])
        # The last test shouldn't have been run
        self.assertEquals(suite.countTestCases(), 1)
Test the C{shouldStop} management: raising a C{KeyboardInterrupt} must
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/test/test_runner.py/DestructiveTestSuiteTestCase.test_shouldStop