Skip to content

Using the pytest support from other extensions #25679

Open

Description

This issue is based on the discussion at #21381

I can't speak for other people that requested it in that discussion, but my use case is this: in my extension I want extensive support for a specific kind of pytest-based tests that use a specific pytest plugin (this one, though it shouldn't be important), including listing the tests in a custom UI, not just in the builtin Tests panel, and running tests from the extension code. Implementing this from scratch means reimplementing pytest discovery and pytest running already implemented in vscode-python which seems suboptimal.

So, while I no longer remember the API available in PythonTestController, it would be nice to have API available to other extensions that allows them to:

  • enumerate tests found by vscode-python
  • run them by node id etc., with the normal VS Code integration
  • be able to extend both discovery and running, e.g. by adding args to pytest invocation done by vscode-python

Please let me know if anything else is needed.

Activity

  1. github-actions commented on Jan 8, 2026

    @github-actions

    Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions