def test_exception(self):
        saved_get_logger = process.multiprocessing.get_logger
        mock_logger = MagicMock()
        def addHandler(ignore):
            mock_logger.handlers = [MagicMock()]
        mock_logger.addHandler = addHandler
        mock_logger.handlers = False
        mock_get_logger = MagicMock()
        mock_get_logger.return_value = mock_logger
        process.multiprocessing.get_logger = mock_get_logger
        self.addCleanup(setattr, process.multiprocessing, 'get_logger', saved_get_logger)
        def func():
            raise AttributeError
        l = ProcessLogger(func)
        self.assertRaises(AttributeError, l)
        mock_get_logger.assert_any_call()
A raised exception gets re-raised
dataset/ETHPy150Open CleanCut/green/green/test/test_process.py/TestProcessLogger.test_exception