Skip to content

Commit

Permalink
add test closing #884 (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasha10 committed Jul 14, 2022
1 parent e95c2c7 commit 154adc1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/structured_conf/test_structured_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,14 @@ def test_merge_into_none_dict(self, module: Any) -> None:

assert OmegaConf.merge(cfg, cfg) == cfg

def test_set_value_after_merge_into_none_dict(self, module: Any) -> None:
cfg = OmegaConf.structured(module.DictOptional)
merged = OmegaConf.merge(cfg, {"as_none": {"x": 100}})
with raises(ValidationError):
merged.as_none.x = "abc"
with raises(ValidationError):
merged.as_none.y = "abc"

@mark.parametrize(
"update_value,expected",
[
Expand Down

0 comments on commit 154adc1

Please sign in to comment.