darrenburns / pytest-clarity

A plugin to improve the output of pytest with colourful unified diffs
MIT License
439 stars 23 forks source link

Add pydantic BaseModel support #26

Open JonathanPlasse opened 1 year ago

JonathanPlasse commented 1 year ago

Hi, Love your plugin! I extensively use pydantic in my projects and was unhappy that I had to add model.dict() for each asserts. So, I added an automatic convertion to have the same diff as if the pydantic model was a dict. The tests pass with pydantic installed or not.

JonathanPlasse commented 5 months ago

Hi @darrenburns, are you interested in this PR, or should I close it?

jonashaag commented 3 days ago

Maybe contribute this to pprintpp?