用法:
unittest.removeHandler(function=None)
當不帶參數調用此函數時,如果已安裝 control-c 處理程序,則會刪除它。此函數也可以用作測試裝飾器,以在執行測試時臨時刪除處理程序:
@unittest.removeHandler def test_signal_handling(self): ...
相關用法
- Python unittest.mock.AsyncMock.assert_awaited_once_with用法及代碼示例
- Python unittest.TestCase.assertWarnsRegex用法及代碼示例
- Python unittest.mock.Mock.reset_mock用法及代碼示例
- Python unittest.mock.Mock.__class__用法及代碼示例
- Python unittest.mock.Mock.call_args用法及代碼示例
- Python unittest.TestCase.assertRaisesRegex用法及代碼示例
- Python unittest.mock.call用法及代碼示例
- Python unittest.mock.Mock.method_calls用法及代碼示例
- Python unittest.mock.Mock.call_args_list用法及代碼示例
- Python unittest.mock.AsyncMock.assert_any_await用法及代碼示例
- Python unittest.mock.Mock.assert_called用法及代碼示例
- Python unittest.TestCase.assertRaises用法及代碼示例
- Python unittest.TestCase.tearDownClass用法及代碼示例
- Python unittest.mock.Mock.assert_not_called用法及代碼示例
- Python unittest.IsolatedAsyncioTestCase用法及代碼示例
- Python unittest.TestCase.setUpClass用法及代碼示例
- Python unittest.mock.AsyncMock.await_args_list用法及代碼示例
- Python unittest.mock.Mock.mock_calls用法及代碼示例
- Python unittest.mock.Mock.assert_has_calls用法及代碼示例
- Python unittest.mock.AsyncMock.assert_awaited_with用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 unittest.removeHandler。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。