can make_dict with disabled suboption
This commit is contained in:
@ -115,6 +115,18 @@ def test_make_dict():
|
||||
raises(ValueError, 'd2 = config.make_dict(withvalue="3")')
|
||||
|
||||
|
||||
def test_make_dict_with_disabled():
|
||||
descr = OptionDescription("opt", "", [
|
||||
OptionDescription("s1", "", [
|
||||
BoolOption("a", "", default=False),
|
||||
BoolOption("b", "", default=False, properties=('disabled',))]),
|
||||
IntOption("int", "", default=42)])
|
||||
config = Config(descr)
|
||||
config.read_only()
|
||||
d = config.make_dict()
|
||||
assert d == {"s1.a": False, "int": 42}
|
||||
|
||||
|
||||
def test_find_in_config():
|
||||
"finds option in config"
|
||||
descr = make_description()
|
||||
|
Reference in New Issue
Block a user