What is the correct order for actual and expected in pytest?

BDFL doesn't like actual/expected terminology and the docs were specifically changed to address this.

If your tooling is expecting arguments in a certain order, then I suppose the most correct thing to do would be to consistently do what works for your tooling.


JUnit

assertEquals(expected, actual)

Pytest

assert actual == expected

For example:

def test_actual_expected():
    expected = 4
    actual = 2+1
    assert actual == expected

Will fail with message

enter image description here

Other's comments have implied this may be more an issue with the way PyCharm displays the message than pytest itself - ie. this message may not exist outside of PyCharm... I dunno.