pytest.fail
in a fixture and in a test
A subtle difference between ERROR and FAIL
I found one amazing property of the pytest recently. If you call pytest.fail
inside a test, it’s a FAIL status for that test (or XFAIL, if it has xfail mark).