Skip to content

Commit

Permalink
Fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
odelalleau committed Mar 3, 2021
1 parent 5ae4efa commit 94dcae5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,12 @@ def cast(t: Any, v: Any) -> Any:
cfg[key]


def test_type_validation_error_no_throw() -> None:
cfg = OmegaConf.structured(User(name="Bond", age=SI("${name}")))
bad_node = cfg._get_node("age")
assert bad_node._dereference_node(throw_on_resolution_failure=False) is None


def test_resolver_output_dictconfig(restore_resolvers: Any) -> None:
OmegaConf.register_new_resolver("dict", lambda: {"a": 0, "b": 1})
cfg = OmegaConf.create({"x": "${dict:}"})
Expand Down

0 comments on commit 94dcae5

Please sign in to comment.