()
| 80 | self.assertTrue(result.shouldStop) |
| 81 | |
| 82 | def test_function(): |
| 83 | result = unittest.TestResult() |
| 84 | unittest.installHandler() |
| 85 | unittest.registerResult(result) |
| 86 | |
| 87 | self.assertNotEqual( |
| 88 | signal.getsignal(signal.SIGINT), |
| 89 | self._default_handler, |
| 90 | ) |
| 91 | |
| 92 | try: |
| 93 | test(result) |
| 94 | except KeyboardInterrupt: |
| 95 | self.fail("KeyboardInterrupt not handled") |
| 96 | self.assertTrue(result.breakCaught) |
| 97 | self.withRepeats(test_function) |
| 98 | |
| 99 | def testSecondInterrupt(self): |
nothing calls this directly
no test coverage detected