diff --git a/tests/test_utils.py b/tests/test_utils.py index fea7a318e..2caa9eec1 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -29,7 +29,7 @@ is_union_annotation, split_key, ) -from omegaconf.errors import UnsupportedValueType, ValidationError +from omegaconf.errors import ConfigValueError, UnsupportedValueType, ValidationError from omegaconf.nodes import ( AnyNode, BooleanNode, @@ -407,7 +407,9 @@ def test_get_structured_config_data_illegal_value(test_cls: Any) -> None: def test_get_structured_config_data_attrs_takes_self() -> None: test_cls = _TestAttrsTakesSelf - with raises(ValueError): + with raises( + ConfigValueError, match="'takes_self' in attrs attributes is not supported" + ): _utils.get_structured_config_data(test_cls)