-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
topic: collectionrelated to the collection phaserelated to the collection phasetopic: marksrelated to marks, either the general marks or builtinrelated to marks, either the general marks or builtintopic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetopic: selectionrelated to test selection from the command linerelated to test selection from the command linetype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
- a detailed description of the bug or problem you are having
- output of
pip list
from the virtual environment you are using (not using pip) - pytest and operating system versions
- minimal example if possible
from pytest import mark
class TestA:
@mark.parametrize("value", [1, 2])
@staticmethod
def test_foo(value: int):
"""doesn't work"""
@staticmethod
@mark.parametrize("value", [1, 2])
def test_bar(value: int):
"""works"""
output of pytest --collect-only
:
<Module test_foo.py>
<Class TestA>
<Function test_foo>
<Function test_bar[1]>
<Function test_bar[2]>
pytest 8.3.3
it should ideally work for both, but if that's not feasible it should at least raise an exception saying that the decorators are in the wrong order
KotlinIsland
Metadata
Metadata
Assignees
Labels
topic: collectionrelated to the collection phaserelated to the collection phasetopic: marksrelated to marks, either the general marks or builtinrelated to marks, either the general marks or builtintopic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetopic: selectionrelated to test selection from the command linerelated to test selection from the command linetype: bugproblem that needs to be addressedproblem that needs to be addressed