Skip to content

Problem to recognize tests with @pytest.mark.parametrize decorator #785

Closed as not planned

Description

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

Does anyone know how to resolve this problem?

Activity

  1. eleanorjboyd commented on Aug 22, 2025

    @eleanorjboyd
    Contributor

    What problem are you facing?

  2. roschel commented on Aug 22, 2025

    @roschel
    Author

    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?

  3. roschel commented on Aug 27, 2025

    @roschel
    Author

    Hello?

  4. eleanorjboyd commented on Aug 29, 2025

    @eleanorjboyd
    Contributor

    can you run python -m pytest --collect-only -v I think that is the collect in verbose mode so I can look at the test ids as those determine how the tests are found and loaded into the UI

  5. roschel commented on Sep 1, 2025

    @roschel
    Author

    Sure, here it's the output

    Image
  6. github-actions commented on Oct 2, 2025

    @github-actions

    Hey Eleanor Boyd (@eleanorjboyd), this issue might need further attention.

    João Roschel (@roschel), you can help us out by closing this issue if the problem no longer exists, or adding more information.

  7. roschel commented on Oct 2, 2025

    @roschel
    Author
  8. roschel commented on Oct 14, 2025

    @roschel
    Author

    Hello?

  9. github-actions commented on Nov 14, 2025

    @github-actions

    Hey Eleanor Boyd (@eleanorjboyd), this issue might need further attention.

    João Roschel (@roschel), you can help us out by closing this issue if the problem no longer exists, or adding more information.

  10. github-actions commented on Dec 15, 2025

    @github-actions

    Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

    Happy Coding!

  11. github-actions commented on Jan 15, 2026

    @github-actions

    Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

    Happy Coding!

  12. roschel commented on Feb 5, 2026

    @roschel
    Author

    Well, I think that's how microsoft support works. They don't even answer your questions. Very nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

info-neededIssue requires more information from postertriage-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