-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
topic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetopic: selectionrelated to test selection from the command linerelated to test selection from the command linetype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Description
This is about this issue in pytest-repeat: pytest-dev/pytest-repeat#21
It seems that the bug doesn't come from the plugin: I managed to reproduce with a simple test here.
It affects all pytest versions, at least since 2.8
I wrote a test and a fix attempt here: vbarbaresi@12769f0
The issue is the following: with parametrized IDs and parametrized fixtures, one can't run a test using its node ID with a [parameter] argument
I tracked it down to the x.name vs name matching, which is in my example:
test_foo[1-param] vs test_foo[param]
My fix attempt drops everything after [ on both sides. However, we lose the supplied parameter value so it's not satisfying. I don't know where to fix this properly.
1Mark
Metadata
Metadata
Assignees
Labels
topic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetopic: selectionrelated to test selection from the command linerelated to test selection from the command linetype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature