callback with option in params which is in an hidden optiondescription
This commit is contained in:
@ -487,3 +487,14 @@ def test_callback_master_and_slaves_value():
|
||||
assert cfg.val1.val2 == ['val2', 'val2', 'val3']
|
||||
|
||||
|
||||
def test_callback_hidden():
|
||||
opt1 = BoolOption('opt1', '')
|
||||
opt2 = BoolOption('opt2', '', callback=return_value, callback_params={'': (('od1.opt1', False),)})
|
||||
od1 = OptionDescription('od1', '', [opt1], properties=('hidden',))
|
||||
od2 = OptionDescription('od2', '', [opt2])
|
||||
maconfig = OptionDescription('rootconfig', '', [od1, od2])
|
||||
cfg = Config(maconfig)
|
||||
cfg.cfgimpl_get_settings().set_permissive(('hidden',))
|
||||
cfg.read_write()
|
||||
raises(PropertiesOptionError, 'cfg.od1.opt1')
|
||||
cfg.od2.opt2
|
||||
|
Reference in New Issue
Block a user