use @pytest.mark.foo() over @pytest.mark.foo
pytest-mark-no-parentheses
Boolean flag specifying whether@pytest.mark.foo()
without parameters should have parentheses.
If the option is set to false (the default),@pytest.mark.foo()
is valid and@pytest.mark.foo
is an error.
If set to true,@pytest.mark.foo
is valid and@pytest.mark.foo()
is an error.
Bad code (assuming pytest-mark-no-parentheses
set to false):
import pytest
@pytest.mark.foo
def test_something():
...
Good code:
import pytest
@pytest.mark.foo()
def test_something():
...
- to enforce consistency between all tests in a codebase