assert introspection despite of custom message #8426
-
The documentation states
Running def foo():
return 1
def test_foo():
assert foo() % 2 == 0, "value was odd, should be even" gives the following output
Given that there is introspection, I'm either misinterpreting the documentation or it is wrong / outdated. Could someone tell me which one is the case? Bonus: Can someone tell me how to disable this introspection locally instead going for the whole module or test suite? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
i believe wrt the docs, at first glance i believe its misleading there, i'll have to crosscheck later when i find some more time, for clarity we should include a example output that makes sense in any case |
Beta Was this translation helpful? Give feedback.
i believe
--assert=plain
should do the trick of disablewrt the docs, at first glance i believe its misleading there,
my understanding is that assertrepr_compare is disabled but not all inspection
i'll have to crosscheck later when i find some more time, for clarity we should include a example output that makes sense in any case