add parents method to MetaConfig
This commit is contained in:
@ -45,6 +45,9 @@ def test_multi_parents_path_same():
|
||||
assert metacfg2.config.path() == 'metacfg1.metacfg2'
|
||||
assert metacfg3.config.path() == 'metacfg1.metacfg3'
|
||||
assert cfg1.config.path() == 'metacfg1.metacfg3.metacfg1.metacfg2.cfg1'
|
||||
metacfg1.option('od1.i1').value.set(1)
|
||||
metacfg3.option('od1.i1').value.set(2)
|
||||
assert cfg1.option('od1.i1').value.get() == 1
|
||||
orideep = cfg1.config.deepcopy(metaconfig_prefix="test_", session_id='test_cfg1')
|
||||
deep = orideep
|
||||
while True:
|
||||
@ -55,11 +58,11 @@ def test_multi_parents_path_same():
|
||||
assert len(children) < 2
|
||||
deep = children[0]
|
||||
assert deep.config.path() == 'test_metacfg3.test_metacfg1.test_metacfg2.test_cfg1'
|
||||
assert cfg1.option('od1.i1').value.get() == 1
|
||||
del orideep
|
||||
raises(ConfigError, "deep.config.path()")
|
||||
|
||||
|
||||
|
||||
def test_multi_parents_value():
|
||||
metacfg1 = make_metaconfig()
|
||||
cfg1 = metacfg1.config.new(type='config', session_id="cfg1")
|
||||
|
Reference in New Issue
Block a user