Did I find the right examples for you? yes no

All Samples(120)  |  Call(119)  |  Derive(0)  |  Import(1)

        def installHandler():
    global _interrupt_handler
    if _interrupt_handler is None:
        default_handler = signal.getsignal(signal.SIGINT)
        _interrupt_handler = _InterruptHandler(default_handler)
        signal.signal(signal.SIGINT, _interrupt_handler)
        


src/p/y/python-bugzilla-1.0.0/setup.py   python-bugzilla(Download)
        if hasattr(unittest, "installHandler"):
            try:
                unittest.installHandler()
            except:
                print("installHandler hack failed")

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/unittest/test/test_break.py   main(Download)
    def testInstallHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler)
 
    def testInterruptCaught(self):
        default_handler = signal.getsignal(signal.SIGINT)
 
        result = unittest.TestResult()
        unittest.installHandler()
    def testSecondInterrupt(self):
        result = unittest.TestResult()
        unittest.installHandler()
        unittest.registerResult(result)
 
    def testTwoResults(self):
        unittest.installHandler()
 
        result = unittest.TestResult()
        unittest.registerResult(result)
    def testHandlerReplacedButCalled(self):
        # If our handler has been replaced (is no longer installed) but is
        # called by the *new* handler, then it isn't safe to delay the
        # SIGINT and we should immediately delegate to the default handler
        unittest.installHandler()

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/unittest/test/test_break.py   main(Download)
    def testInstallHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler)
 
    def testInterruptCaught(self):
        default_handler = signal.getsignal(signal.SIGINT)
 
        result = unittest.TestResult()
        unittest.installHandler()
    def testSecondInterrupt(self):
        result = unittest.TestResult()
        unittest.installHandler()
        unittest.registerResult(result)
 
    def testTwoResults(self):
        unittest.installHandler()
 
        result = unittest.TestResult()
        unittest.registerResult(result)
    def testHandlerReplacedButCalled(self):
        # If our handler has been replaced (is no longer installed) but is
        # called by the *new* handler, then it isn't safe to delay the
        # SIGINT and we should immediately delegate to the default handler
        unittest.installHandler()

src/t/e/testtools-HEAD/testtools/run.py   testtools(Download)
    def runTests(self):
        if (self.catchbreak
            and getattr(unittest, 'installHandler', None) is not None):
            unittest.installHandler()
        testRunner = self._get_runner()

src/t/r/TrustRouter-HEAD/client/packaging/Windows/Python32/Lib/unittest/test/test_break.py   TrustRouter(Download)
    def testInstallHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler)
 
    def testInterruptCaught(self):
        default_handler = signal.getsignal(signal.SIGINT)
 
        result = unittest.TestResult()
        unittest.installHandler()
    def testSecondInterrupt(self):
        result = unittest.TestResult()
        unittest.installHandler()
        unittest.registerResult(result)
 
    def testTwoResults(self):
        unittest.installHandler()
 
        result = unittest.TestResult()
        unittest.registerResult(result)
    def testHandlerReplacedButCalled(self):
        # If our handler has been replaced (is no longer installed) but is
        # called by the *new* handler, then it isn't safe to delay the
        # SIGINT and we should immediately delegate to the default handler
        unittest.installHandler()

src/p/y/pytaint-HEAD/Python-2.7.5-pytaint/Lib/unittest/test/test_break.py   pytaint(Download)
    def testInstallHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler)
 
    def testInterruptCaught(self):
        default_handler = signal.getsignal(signal.SIGINT)
 
        result = unittest.TestResult()
        unittest.installHandler()
            self.skipTest("test requires SIGINT to not be ignored")
        result = unittest.TestResult()
        unittest.installHandler()
        unittest.registerResult(result)
 
    def testTwoResults(self):
        unittest.installHandler()
 
        result = unittest.TestResult()
        unittest.registerResult(result)
        # called by the *new* handler, then it isn't safe to delay the
        # SIGINT and we should immediately delegate to the default handler
        unittest.installHandler()
 
        handler = signal.getsignal(signal.SIGINT)

src/s/t/static-python-HEAD/Lib/unittest/test/test_break.py   static-python(Download)
    def testInstallHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        self.assertNotEqual(signal.getsignal(signal.SIGINT), default_handler)
 
    def testInterruptCaught(self):
        default_handler = signal.getsignal(signal.SIGINT)
 
        result = unittest.TestResult()
        unittest.installHandler()
            self.skipTest("test requires SIGINT to not be ignored")
        result = unittest.TestResult()
        unittest.installHandler()
        unittest.registerResult(result)
 
    def testTwoResults(self):
        unittest.installHandler()
 
        result = unittest.TestResult()
        unittest.registerResult(result)
        # called by the *new* handler, then it isn't safe to delay the
        # SIGINT and we should immediately delegate to the default handler
        unittest.installHandler()
 
        handler = signal.getsignal(signal.SIGINT)

src/p/o/pourover-HEAD/buster/lib/django/test/runner.py   pourover(Download)
    def setup_test_environment(self, **kwargs):
        setup_test_environment()
        settings.DEBUG = False
        unittest.installHandler()
 

src/p/y/pyjaco-HEAD/run_tests.py   pyjaco(Download)
import testtools.util
import testtools.tests
from unittest import installHandler
 
def main():
    installHandler()

src/o/p/opencafe-HEAD/cafe/drivers/unittest/runner.py   opencafe(Download)
        exit_code = 0
        proc = None
        unittest.installHandler()
        processes = []
        manager = Manager()
 
        exit_code = 0
        unittest.installHandler()
        start_time = time.time()
        result = test_runner.run(master_suite)

  1 | 2  Next