PT001 | use @pytest.fixture() over @pytest.fixture (configurable by pytest-fixture-no-parentheses ) |
PT002 | configuration for fixture '{name}' specified via positional args, use kwargs |
PT003 | scope='function' is implied in @pytest.fixture() |
PT004 | fixture '{name}' does not return anything, add leading underscore |
PT005 | fixture '{name}' returns a value, remove leading underscore |
PT006 | wrong name(s) type in @pytest.mark.parametrize, expected {expected_type} (configurable by pytest-parametrize-names-type ) |
PT007 | wrong values type in @pytest.mark.parametrize, expected {expected_type} (configurable by pytest-parametrize-values-type and pytest-parametrize-values-row-type ) |
PT008 | use return_value= instead of patching with lambda |
PT009 | use a regular assert instead of unittest-style '{assertion}' |
PT010 | set the expected exception in pytest.raises() |
PT011 | pytest.raises({exception}) is too broad, set the match parameter or use a more specific exception (configurable by pytest-raises-require-match-for ) |
PT012 | pytest.raises() block should contain a single simple statement |
PT013 | found incorrect import of pytest, use simple 'import pytest' instead |
PT014 | found duplicate test cases {indexes} in @pytest.mark.parametrize |
PT015 | assertion always fails, replace with pytest.fail() |
PT016 | no message passed to pytest.fail() |
PT017 | found assertion on exception {name} in except block, use pytest.raises() instead |
PT018 | assertion should be broken down into multiple parts |
PT019 | fixture {name} without value is injected as parameter, use @pytest.mark.usefixtures instead |
PT020 | @pytest.yield_fixture is deprecated, use @pytest.fixture |
PT021 | use yield instead of request.addfinalizer |
PT022 | no teardown in fixture {name}, use return instead of yield |
PT023 | use @pytest.mark.foo() over @pytest.mark.foo (configurable by pytest-mark-no-parentheses ) |
PT024 | pytest.mark.asyncio is unnecessary for fixtures |
PT025 | pytest.mark.usefixtures has no effect on fixtures |
PT026 | useless pytest.mark.usefixtures without parameters |
PT027 | use pytest.raises() instead of unittest-style '{assertion}' |