Skip to content

Using the pytest support from other extensions #25679

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

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