Skip to content

launch.json "args" don't get passed to pytest unittests #12997

@shaananc

Description

@shaananc

Environment data

  • VS Code version: 1.48.0-insider
  • Extension version (available under the Extensions sidebar): pyvsc-run-isolated.py
  • OS and version: macOS 0.15.6 Beta (19G71a)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): poetry
  • Relevant/affected Python packages and their versions: pytest

Expected behaviour

A configuration like the following:

    {
      "name": "Debug Tests",
      "type": "python",
      "request": "test",
      "console": "integratedTerminal",
      "osx": { "args": ["--pdb -s"] }
    }

should pass the arguments to pytest or the other testing framework used

Actual behaviour

Arguments get passed to pyvsc-run-isolated.py

Steps to reproduce:

  1. Create a pytest compatible unit test

  2. Create launch.json containing

    {
      "name": "Debug Tests",
      "type": "python",
      "request": "test",
      "console": "integratedTerminal",
      "osx": { "args": ["--pdb -s"] }
    }
  1. Run an individual test

Note: I took a look at the code that runs pyvsc-run-isolated.py and the launch.json args just aren't supported yet as far as I can tell. Would hopefully not be too much work for someone familiar with vscode internals.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions