Help with plugin assertion rewriting #5931
Labels
topic: reporting
related to terminal output and user-facing messages and errors
type: question
general question, might be closed after 2 weeks of inactivity
Hey, I was looking at the pytest-clarity package and it does something really nice, imo, which is it turns this:
into:
The downside is that the rewriting results in a loss of functionality:
Goes from
to
I've been digging through the source and I can't quite find the right part to use to do this. It stems from use of
pytest_assertrepr_compare
but I can't find anything in pytest I can use to construct that3 = len([1, 2, 3])
. I'm looking for some pointers if anyone can help put me on the right track. I was barking down theAssertionRewriter
which I think is what I'm looking for but I can't quite put my finger on how to modify these assertions in way that still utilizes that code.The text was updated successfully, but these errors were encountered: