Skip to content

Commit

Permalink
adding failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
omry committed Feb 1, 2021
1 parent 47aa912 commit 6850ccf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_basic_ops_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,3 +811,12 @@ def test_self_assign_list_value_with_ref_type(c: Any) -> None:
cfg = OmegaConf.create(c)
cfg.a = cfg.a
assert cfg == c


def test_assign_to_sc_field_without_ref_type():
cfg = OmegaConf.create({"plugin": ConcretePlugin})
with pytest.raises(ValidationError):
cfg.plugin.params.foo = "bar"

cfg.plugin = 10
assert cfg.plugin == 10

0 comments on commit 6850ccf

Please sign in to comment.