Ask questions[Feature request] Multi-root: Allow disabling tests (discovery/prompts/...) for a root


Multi-root workspaces are motivated like this:

For example, you might have a repository with a product's documentation which you like to keep current when you update the product source code.

Exactly my use case. However, in such a multi-root workspace, I am now often confronted with the choice of one of the two folders for various operations. This is mostly fine, but really useless when it comes to testing: my documentation repo does not offer any testing whatsoever. So it's unnecessary work for me to select the product repo each time I discover tests, or run all tests, etc.

Maybe I have missed it, but a setting to disable all test functionality would be highly appreciated. I would then put this setting into the .vscode/settings.json in the documentation repo and be very happy. (If this already exists, I'd be even happier, but I haven't found it yet.)


Answer questions luabud

[updating my comment because I had misunderstood the problem, sorry about that!]

@bersbersbers this prompt you showed should only be displayed if you trigger test discovery (i.e. if you click on the "discover tests" button in the test explorer view or run the Python: Discover Tests command).


Can you confirm that this is what is happening?

You can also disable all test frameworks by adding the following to the .vscode/settings.json file in your docs repo:

 "python.testing.unittestEnabled": false,
 "python.testing.pytestEnabled": false, 

Related questions

Auto Scroll in the Jupyter output hot 3
Workspace contains pipfile but pipenv --venv failed hot 2
Can you turn off the Microsoft Python Language Server? hot 2
Unable to debug Python tests (duplicate entries in "env") hot 2
Jupyter server crashed. Unable to connect. Cannot assign requested address hot 2
Auto Scroll in the Jupyter output hot 2
Unable to run launch targets with newest VS Code Python extension hot 2
Unable to start jupyter python interactive window hot 1
HBox output is not shown correctly in the interactive window hot 1
Debug -> Add Debug Configuration 'Cannot read property openConfigFile' hot 1
VSCode cannot connect to jupyter server; with browser this works fine hot 1
Linux arm64/aarch64 support hot 1
Add setting to disable icon for "Run Python File In Terminal" hot 1
Extension Host keeps crashing hot 1
Activate environment before debugging tests hot 1
Github User Rank List