ID EN
Unittest

removeHandler

Python 3.11

When called without arguments this function removes the control-c handler if it has been installed. This function can also be used as a test decorator to temporarily remove the handler while the test is being executed:

Syntax

PYTHON
unittest.removeHandler(function=None)

Examples

Example 1
PYTHON
@unittest.removeHandler
def test_signal_handling(self):
    ...