fix: uncalculated dynamic
This commit is contained in:
parent
3fad16d0ac
commit
d1add3dc5a
2 changed files with 4 additions and 9 deletions
|
|
@ -485,24 +485,21 @@ def test_dyndescription_subdyn():
|
||||||
assert set(cfg.option('od.dod2.dod.st').property.get(uncalculated=True)) == {'validator'}
|
assert set(cfg.option('od.dod2.dod.st').property.get(uncalculated=True)) == {'validator'}
|
||||||
with pytest.raises(AttributeOptionError):
|
with pytest.raises(AttributeOptionError):
|
||||||
cfg.option('od.dod2.dodval1.st').property.get(uncalculated=True)
|
cfg.option('od.dod2.dodval1.st').property.get(uncalculated=True)
|
||||||
with pytest.raises(AttributeOptionError):
|
assert cfg.option('od.dod2val1.dod.st').property.get(uncalculated=True) == {'validator'}
|
||||||
cfg.option('od.dod2val1.dod.st').property.get(uncalculated=True)
|
|
||||||
#
|
#
|
||||||
with pytest.raises(AttributeOptionError):
|
with pytest.raises(AttributeOptionError):
|
||||||
cfg.option('od.dod2.dod.st').name()
|
cfg.option('od.dod2.dod.st').name()
|
||||||
with pytest.raises(AttributeOptionError):
|
with pytest.raises(AttributeOptionError):
|
||||||
cfg.option('od.dod2val1.dod.st').name()
|
cfg.option('od.dod2val1.dod.st').name()
|
||||||
assert cfg.option('od.dod2.dod.st').name(uncalculated=True) == 'st'
|
assert cfg.option('od.dod2.dod.st').name(uncalculated=True) == 'st'
|
||||||
with pytest.raises(AttributeOptionError):
|
cfg.option('od.dod2val1.dod.st').name(uncalculated=True)
|
||||||
cfg.option('od.dod2val1.dod.st').name(uncalculated=True)
|
|
||||||
#
|
#
|
||||||
with pytest.raises(AttributeOptionError):
|
with pytest.raises(AttributeOptionError):
|
||||||
cfg.option('od.dod2.dod.st').path()
|
cfg.option('od.dod2.dod.st').path()
|
||||||
with pytest.raises(AttributeOptionError):
|
with pytest.raises(AttributeOptionError):
|
||||||
cfg.option('od.dod2val1.dod.st').path()
|
cfg.option('od.dod2val1.dod.st').path()
|
||||||
assert cfg.option('od.dod2.dod.st').path(uncalculated=True) == 'od.dod2.dod.st'
|
assert cfg.option('od.dod2.dod.st').path(uncalculated=True) == 'od.dod2.dod.st'
|
||||||
with pytest.raises(AttributeOptionError):
|
assert cfg.option('od.dod2val1.dod.st').path(uncalculated=True) == 'od.dod2.dod.st'
|
||||||
cfg.option('od.dod2val1.dod.st').path(uncalculated=True)
|
|
||||||
#
|
#
|
||||||
assert cfg.option('od.dod2.dod.st').isoptiondescription() is False
|
assert cfg.option('od.dod2.dod.st').isoptiondescription() is False
|
||||||
assert cfg.option('od.dod2val1.dodval1.st').isoptiondescription() is False
|
assert cfg.option('od.dod2val1.dodval1.st').isoptiondescription() is False
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,7 @@ class SubConfig:
|
||||||
check_dynamic_without_identifiers
|
check_dynamic_without_identifiers
|
||||||
and parent
|
and parent
|
||||||
and parent.is_dynamic
|
and parent.is_dynamic
|
||||||
|
and parent.is_dynamic_without_identifiers
|
||||||
and self.is_dynamic_without_identifiers
|
and self.is_dynamic_without_identifiers
|
||||||
!= parent.is_dynamic_without_identifiers
|
!= parent.is_dynamic_without_identifiers
|
||||||
):
|
):
|
||||||
|
|
@ -742,11 +743,9 @@ class _Config(CCache):
|
||||||
len_path = len(paths) - 1
|
len_path = len(paths) - 1
|
||||||
for idx, name in enumerate(paths):
|
for idx, name in enumerate(paths):
|
||||||
if idx != len_path:
|
if idx != len_path:
|
||||||
check_dynamic_without_identifiers=True
|
|
||||||
index_ = None
|
index_ = None
|
||||||
true_path_ = None
|
true_path_ = None
|
||||||
else:
|
else:
|
||||||
check_dynamic_without_identifiers=not allow_dynoption
|
|
||||||
index_ = index
|
index_ = index
|
||||||
true_path_ = true_path
|
true_path_ = true_path
|
||||||
|
|
||||||
|
|
@ -797,7 +796,6 @@ class _Config(CCache):
|
||||||
name=name,
|
name=name,
|
||||||
identifier=identifier,
|
identifier=identifier,
|
||||||
true_path=true_path_,
|
true_path=true_path_,
|
||||||
check_dynamic_without_identifiers=check_dynamic_without_identifiers,
|
|
||||||
)
|
)
|
||||||
return subconfig
|
return subconfig
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue