def _setState(self, state): """ Serializer load implementation """ self._logger = logging.getLogger(state['_logger']['name']) self._logger.setLevel(state['_logger']['level']) del state['_logger'] self._config = ConfigParser.recoverFromState(state['_config']) builder_name = self._config.getBuilder() self._logger.debug("Recovered builder is '%s'", builder_name) builder_class = hdlcc.builders.getBuilderByName(builder_name) self.builder = builder_class.recoverFromState(state['builder'])
def _setState(self, state): """ Serializer load implementation """ self._logger = logging.getLogger(state['_logger']['name']) self._logger.setLevel(state['_logger']['level']) del state['_logger'] self._config = ConfigParser.recoverFromState(state['_config']) builder_name = self._config.getBuilder() self._logger.debug("Recovered builder is '%s'", builder_name) builder_class = hdlcc.builders.getBuilderByName(builder_name) self.builder = builder_class.recoverFromState(state['builder'])
def test(): state = it.parser.getState() restored = ConfigParser.recoverFromState(state) it.assertEqual(it.parser, restored)
def test(): state = it.parser.getState() restored = ConfigParser.recoverFromState(state) it.assertEqual(it.parser, restored)