Skip to content

Add separate python.testing.pytestArgs settings for regular, debug and discovery runs #21255

@mpekurin

Description

@mpekurin

Evolved from #21190.

Related to #693, #19809, #19985 and some others.

Some of the pytest plugins may change how it works (e.g. running in parallel via pytest-xdist) or do some actions that are required on regular test runs but are unwanted on debug or discovery runs (e.g. generating a coverage report via pytest-cov). Currently vscode provides a single setting for configuring the args, and they are used for all the kinds of runs. Sometimes such behavior is inconvenient. Separating the single setting into 3 (for regular runs, for debug runs and for discovery runs) would make configuring pytest much more flexible.

Something like

"python.testing.pytestArgs": {
    "run": [], // equal to the current "python.testing.pytestArgs": []
    "debug": [],
    "discovery": []
}

or

"python.testing.pytestRunArgs": [],
"python.testing.pytestDebugArgs": [],
"python.testing.pytestDiscoveryArgs": []

Metadata

Metadata

Assignees

Labels

area-testingcommunity askFeature request that the community expressed interest infeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions