Skip to content
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

Actual and Expected are being mixed up in assert diffs #3992

Closed
abotalov opened this issue Sep 17, 2018 · 4 comments
Closed

Actual and Expected are being mixed up in assert diffs #3992

abotalov opened this issue Sep 17, 2018 · 4 comments
Labels
status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity type: question general question, might be closed after 2 weeks of inactivity

Comments

@abotalov
Copy link

Currently the verbose diff looks like:

def test_function():
  assert 3 == 4
4 != 3

Expected :3
Actual   :4
 <Click to see difference>

def test_function():
>     assert 3 == 4
E     assert 3 == 4

../../test_sample.py:4: AssertionError

As the usual idiom is assert actual == expected, these words are mixed up.

Similar to #3333.

@nicoddemus
Copy link
Member

I think you are copying pasting the output from PyCharm, right? In that case that's PyCharm producing that output, and pytest really cannot do anything about it.

@nicoddemus nicoddemus added type: question general question, might be closed after 2 weeks of inactivity status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity labels Sep 17, 2018
@abotalov
Copy link
Author

abotalov commented Sep 17, 2018

Yes, I copy pasted it from PyCharm, thought it's generated by Pytest.

@abotalov
Copy link
Author

@nicoddemus
Copy link
Member

Thanks for the link. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity type: question general question, might be closed after 2 weeks of inactivity
Projects
None yet
Development

No branches or pull requests

2 participants