diff --git a/tests/test_dyn_optiondescription.py b/tests/test_dyn_optiondescription.py index c121483..7b74349 100644 --- a/tests/test_dyn_optiondescription.py +++ b/tests/test_dyn_optiondescription.py @@ -485,24 +485,21 @@ def test_dyndescription_subdyn(): assert set(cfg.option('od.dod2.dod.st').property.get(uncalculated=True)) == {'validator'} with pytest.raises(AttributeOptionError): cfg.option('od.dod2.dodval1.st').property.get(uncalculated=True) - with pytest.raises(AttributeOptionError): - cfg.option('od.dod2val1.dod.st').property.get(uncalculated=True) + assert cfg.option('od.dod2val1.dod.st').property.get(uncalculated=True) == {'validator'} # with pytest.raises(AttributeOptionError): cfg.option('od.dod2.dod.st').name() with pytest.raises(AttributeOptionError): cfg.option('od.dod2val1.dod.st').name() 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): cfg.option('od.dod2.dod.st').path() with pytest.raises(AttributeOptionError): cfg.option('od.dod2val1.dod.st').path() assert cfg.option('od.dod2.dod.st').path(uncalculated=True) == 'od.dod2.dod.st' - with pytest.raises(AttributeOptionError): - cfg.option('od.dod2val1.dod.st').path(uncalculated=True) + assert cfg.option('od.dod2val1.dod.st').path(uncalculated=True) == 'od.dod2.dod.st' # assert cfg.option('od.dod2.dod.st').isoptiondescription() is False assert cfg.option('od.dod2val1.dodval1.st').isoptiondescription() is False diff --git a/tiramisu/config.py b/tiramisu/config.py index da4cbb4..f445cd2 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -286,6 +286,7 @@ class SubConfig: check_dynamic_without_identifiers and parent and parent.is_dynamic + and parent.is_dynamic_without_identifiers and self.is_dynamic_without_identifiers != parent.is_dynamic_without_identifiers ): @@ -742,11 +743,9 @@ class _Config(CCache): len_path = len(paths) - 1 for idx, name in enumerate(paths): if idx != len_path: - check_dynamic_without_identifiers=True index_ = None true_path_ = None else: - check_dynamic_without_identifiers=not allow_dynoption index_ = index true_path_ = true_path @@ -797,7 +796,6 @@ class _Config(CCache): name=name, identifier=identifier, true_path=true_path_, - check_dynamic_without_identifiers=check_dynamic_without_identifiers, ) return subconfig