do not remove context user when reset config
This commit is contained in:
parent
509d902e72
commit
6e30f59803
|
@ -347,6 +347,8 @@ def test_help():
|
|||
def test_config_reset():
|
||||
descr = make_description()
|
||||
c = Config(descr)
|
||||
c.owner.set('test')
|
||||
assert c.owner.get() == 'test'
|
||||
assert not c.option('gc.gc2.bool').value.get()
|
||||
assert not c.option('boolop').property.get()
|
||||
assert not c.option('boolop').permissive.get()
|
||||
|
@ -361,7 +363,9 @@ def test_config_reset():
|
|||
assert c.option('float').permissive.get()
|
||||
assert c.option('wantref').information.get('info', None)
|
||||
#
|
||||
assert c.owner.get() == 'test'
|
||||
c.config.reset()
|
||||
assert c.owner.get() == 'test'
|
||||
assert not c.option('gc.gc2.bool').value.get()
|
||||
assert not c.option('boolop').property.get()
|
||||
assert not c.option('float').permissive.get()
|
||||
|
|
|
@ -1032,7 +1032,13 @@ class TiramisuContextConfig(TiramisuContext):
|
|||
|
||||
def _c_reset(self):
|
||||
# Option's values
|
||||
context_owner = self.config_bag.context.cfgimpl_get_values().get_context_owner()
|
||||
self.config_bag.context.cfgimpl_get_values()._p_.importation((tuple(), tuple(), tuple(), tuple()))
|
||||
self.config_bag.context.cfgimpl_get_values()._p_.setvalue(None,
|
||||
None,
|
||||
context_owner,
|
||||
None,
|
||||
True)
|
||||
# Option's informations
|
||||
self.config_bag.context.cfgimpl_get_values()._p_.del_informations()
|
||||
# Option's properties
|
||||
|
|
Loading…
Reference in New Issue