I'm seeing that assertion messages do not seem to be displayed if the assertion occurs in a helper method within the same module as my test when in PyCharm.
This only seems to be happening in PyCharm - it does not happen when running from the command line.
This works:
def test_assertion_message_working():
assert 1 == 2, "my message"
Expected :2
Actual :1
...
def test_assertion_message_working():
> assert 1 ==2, "my message"
But this doesn't (the test fails, but I do not get the failure message):
def test_assertion_message_not_working():
do_assertion()
def do_assertion():
assert 1 == 2, "my message"
1 != 2
Expected :2
Actual :1
...
def test_assertion_not_working():
> do_assertion()
Wondering if there is any setting (or workaround) I need to apply to get this working?