diff --git a/test/test_config_api.py b/test/test_config_api.py index 935cbf0..52d4aa4 100644 --- a/test/test_config_api.py +++ b/test/test_config_api.py @@ -350,15 +350,19 @@ def test_config_reset(): assert not c.option('gc.gc2.bool').value.get() assert not c.option('boolop').property.get() assert not c.option('boolop').permissive.get() + assert not c.option('wantref').information.get('info', None) # c.option('gc.gc2.bool').value.set(True) c.option('boolop').property.add('test') c.option('float').permissive.set(frozenset(['test'])) + c.option('wantref').information.set('info', 'info') assert c.option('gc.gc2.bool').value.get() assert c.option('boolop').property.get() assert c.option('float').permissive.get() + assert c.option('wantref').information.get('info', None) # c.config.reset() assert not c.option('gc.gc2.bool').value.get() assert not c.option('boolop').property.get() assert not c.option('float').permissive.get() + assert not c.option('wantref').information.get('info', None) diff --git a/tiramisu/api.py b/tiramisu/api.py index 51aa188..94e79c1 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -991,9 +991,6 @@ class TiramisuContextConfig(TiramisuContext): def _c_meta(self): return Config(self.config_bag.context.cfgimpl_get_meta()) - def _c_reset(self): - pass - def _m_new(self, name): return Config(self.config_bag.context.new_config(name)) @@ -1010,6 +1007,8 @@ class TiramisuContextConfig(TiramisuContext): def _c_reset(self): # Option's values self.config_bag.context.cfgimpl_get_values()._p_.importation((tuple(), tuple(), tuple(), tuple())) + # Option's informations + self.config_bag.context.cfgimpl_get_values()._p_.del_informations() # Option's properties self.config_bag.context.cfgimpl_get_settings()._p_.importation({}) # Option's permissives