We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a870be commit 7e42154Copy full SHA for 7e42154
tests/test_model_generator_edges.py
@@ -108,8 +108,9 @@ def test_type_converter_anyof_single():
108
109
def test_type_converter_unknown_list_first_type_fallback():
110
# Invalid enum value in list should raise ValidationError (spec invalid)
111
- import pydantic
112
- with pytest.raises(pydantic.ValidationError): # type: ignore[attr-defined]
+ from pydantic import ValidationError
+ # Mixing unknown string with enum should raise ValidationError during model validation
113
+ with pytest.raises(ValidationError):
114
Schema(type=["mystery", DataType.STRING]) # type: ignore[arg-type]
115
116
0 commit comments