Did I find the right examples for you? yes no

All Samples(29)  |  Call(29)  |  Derive(0)  |  Import(0)

        def removeHandler(method=None):
    if method is not None:
        @wraps(method)
        def inner(*args, **kwargs):
            initial = signal.getsignal(signal.SIGINT)
            removeHandler()
            try:
                return method(*args, **kwargs)
            finally:
                signal.signal(signal.SIGINT, initial)
        return inner

    global _interrupt_handler
    if _interrupt_handler is not None:
        signal.signal(signal.SIGINT, _interrupt_handler.original_handler)
        


src/t/r/TrustRouter-HEAD/client/packaging/Windows/Python32/Lib/unittest/test/test_break.py   TrustRouter(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

src/p/y/pytaint-HEAD/Python-2.7.5-pytaint/Lib/unittest/test/test_break.py   pytaint(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

src/s/t/static-python-HEAD/Lib/unittest/test/test_break.py   static-python(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

src/p/o/pourover-HEAD/buster/lib/django/test/runner.py   pourover(Download)
    def teardown_test_environment(self, **kwargs):
        unittest.removeHandler()
        teardown_test_environment()
 
    def suite_result(self, suite, result, **kwargs):

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/unittest/test/test_break.py   main(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

src/m/a/main-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/unittest/test/test_break.py   main(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

src/g/i/gitstack-HEAD/python/Lib/unittest/test/test_break.py   gitstack(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

src/e/m/empythoned-HEAD/cpython/Lib/unittest/test/test_break.py   empythoned(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

src/p/y/PyCPython-HEAD/Python-2.7.1/Lib/unittest/test/test_break.py   PyCPython(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

src/c/p/cpython-HEAD/Lib/unittest/test/test_break.py   cpython(Download)
    def testRemoveHandler(self):
        default_handler = signal.getsignal(signal.SIGINT)
        unittest.installHandler()
        unittest.removeHandler()
        self.assertEqual(signal.getsignal(signal.SIGINT), default_handler)
 
        # check that calling removeHandler multiple times has no ill-effect
        unittest.removeHandler()

  1 | 2  Next