-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increasing verbosity turns off the assertion rewriting #5932
Comments
Thanks for the details report. It's a duplicate of #5192 AFAICS. |
Very correct. Feel free to close it, and merge them if you'd like. My other issue is related to both in that the cause of this is the interaction between this hook and the rewriting. Is it intentional that this method returning a value doesn't do the rewrite? |
See #5933. If the hook returns something the default is not used anymore. |
Closing as duplicate - please follow up in the PR (give it a try?). |
Given a file:
pytest will output
However if I increase the verbosity, so that I can see more of the diff (either
-v
or-vv
) like so, then it removed the helpful assertion rewriting from the first testThis is caused by these two lines here:
pytest/src/_pytest/assertion/util.py
Lines 148 to 149 in c58b0fb
Which was introduced here
#4607
I came across this when working on plugin stuff (I opened this to get help: #5931). Which is related in a way, in that the Rewriter isn't being used when
assertrepr_compare
(either builtin or as a plugin) returns something.The text was updated successfully, but these errors were encountered: