Skip to content

Problem to recognize tests with @pytest.mark.parametrize decorator inside class #947

@roschel

Description

@roschel

Let's see if I'll get some answers this time, because my first issue was ignored #785

Hello guys.

I've been facing some problems here when trying to debug tests that is decorated with parametrize.

Image

VsCode can't recognize these tests with parametrize from pytest.

my .vscode/settings.json:

{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
My VsCode version: 1.103.1

So, The problem is that the run/debug button from vscode doesn't appear when the test is decorated with @pytest.mark.parametrize.

According with the picture I attached, the first test, which is decorated, doesn't have the run/debug enabled. While the second test without the decorator has the run/debug button enabled.

Why this happen in vscode?

Does anyone know how to resolve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions