assertion always fails, replace with pytest.fail()
Bad code:
def test_foo():
if some_condition:
assert False, 'some_condition was True'
Good code:
import pytest
def test_foo():
if some_condition:
pytest.fail('some_condition was True')
- to enforce consistency across all tests in a codebase
- to improve readability of test code and error messages