no message passed to pytest.fail()
The function pytest.fail must be called either with a positional argument,
a keyword argument reason= (since pytest version 7.0.0), or a keyword argument msg=
(for compatibility with older versions of pytest). Passing a keyword argument under a
wrong name will also be reported as a violation.
Bad code:
import pytest
def test_foo():
pytest.fail()
def test_bar():
pytest.fail('')
def test_baz():
pytest.fail(message='...') # wrong kwarg nameGood code:
import pytest
def test_foo():
pytest.fail('...')
def test_bar():
pytest.fail(reason='...')
def test_baz():
pytest.fail(msg='...')- to make it easier to understand and debug test failures