diff --git a/test/test_option_calculation.py b/test/test_option_calculation.py index 64fba6a..e0a5375 100644 --- a/test/test_option_calculation.py +++ b/test/test_option_calculation.py @@ -465,6 +465,21 @@ def test_callback_master_and_slaves_master3(): assert list(cfg.cfgimpl_get_values().mandatory_warnings()) == ['val1.val1'] +def test_callback_master_and_slaves_master4(): + val1 = StrOption('val1', "", ['val1'], multi=True, properties=('mandatory',)) + val2 = StrOption('val2', "", multi=True, default_multi='val2', properties=('expert', 'mandatory')) + val3 = StrOption('val3', "", multi=True, callback=return_value, callback_params={'': ((val2, False),)}) + val4 = StrOption('val4', "", multi=True, callback=return_value, callback_params={'': ((val3, False),)}) + interface1 = OptionDescription('val1', '', [val1, val2, val3, val4]) + interface1.impl_set_group_type(groups.master) + maconfig = OptionDescription('rootconfig', '', [interface1]) + cfg = Config(maconfig) + cfg.read_write() + cfg.cfgimpl_get_settings().append('expert') + cfg.cfgimpl_get_settings().setpermissive(('expert',)) + assert list(cfg.cfgimpl_get_values().mandatory_warnings(force_permissive=True)) == [] + + def test_callback_master_and_slaves_master_list(): val1 = StrOption('val1', "", multi=True, callback=return_list) val2 = StrOption('val2', "", multi=True)