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

JUnit

assertEquals(expected, actual)

Pytest (Pycharm)

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…

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)