Don't check for the specific pydantic error, we just want to fail it in some way. I hope to add some validation logic directly in _EntityBasePlaceholder some day.
Skip if pydantic is unavailable, so when user runs the tests without this optional dependency we communicate "you can continue without it, but you'll miss some features"
I'd like to ask for two changes:
Don't check for the specific pydantic error, we just want to fail it in some way. I hope to add some validation logic directly in
_EntityBasePlaceholder
some day.Skip if pydantic is unavailable, so when user runs the tests without this optional dependency we communicate "you can continue without it, but you'll miss some features"
Example of where I found it (not sure if it's the only place) https://github.com/Shimul-Baidya/MBDyn/blob/80f359c36febf36195c5d767f7db161aa880a14e/contrib/PythonPreprocessor/test_MBDynLib.py#L166-L167
Example of how I wrote a similar test: https://github.com/Shimul-Baidya/MBDyn/blob/80f359c36febf36195c5d767f7db161aa880a14e/contrib/PythonPreprocessor/test_MBDynLib.py#L51-L53