-
-
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
Printing assert statement with Function call #1592
Comments
Thanks for the report! |
Hi @cksagni91, I think the main idea was to return I am working on a fix and am almost done with it, so a PR will follow in the next days. There are good chances that this comes in the next release. |
@nicoddemus, @hpk42
there seems to be the intention to do no rewrite, but for the following:
and maybe other cases, it is not so easy to find a rule to rewrite it. So again the question, do we want to change the rewrite in a way @cksagni91 suggested? |
As it seems, the |
We are reading the exception output of Pytest using hooks.
The issue we are facing is that if function call in assert statement returns False, then it gives back the function statement itself
PyTest Version : 2.9.2
OS : Windows 8 - 64bit
Code :
Testcases :
Output:
As it can be seen, for the testcase test_check_even2, the error report is returned with
function_call == expected output [check_even(3) == True] , rather than
return_value_of_function == expected_output [ False == True ]
This issue occurs only if the function returns FALSE.
The text was updated successfully, but these errors were encountered: