get information with default attribute when information is set to an option
This commit is contained in:
@ -66,6 +66,21 @@ def test_option_get_information_config():
|
||||
assert i.impl_get_information('doc') == description
|
||||
|
||||
|
||||
def test_option_get_information_default():
|
||||
description = "it's ok"
|
||||
string = 'some informations'
|
||||
string
|
||||
i = IntOption('test', description)
|
||||
i.impl_set_information('noinfo', 'optdefault')
|
||||
od = OptionDescription('od', '', [i])
|
||||
cfg = Config(od)
|
||||
#
|
||||
assert cfg.option('test').information.get('noinfo', 'falsedefault') == 'optdefault'
|
||||
#
|
||||
cfg.option('test').information.set('noinfo', 'notdefault')
|
||||
assert cfg.option('test').information.get('noinfo', 'falsedefault') == 'notdefault'
|
||||
|
||||
|
||||
def test_option_get_information_config2():
|
||||
description = "it's ok"
|
||||
string = 'some informations'
|
||||
|
Reference in New Issue
Block a user