@pytest.fixture
def merge_log_err(hass):
 with mock.patch('homeassistant.config._LOGGER.error') as logerr:
  (yield logerr)

@ pytest . fixture def merge_log_err ( hass ) : with mock . patch ( 'homeassistant.config._LOGGER.error' ) as logerr : ( yield logerr )
patch _merge_log_error from packages .