question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

(Re-filing https://github.com/microsoft/vscode/issues/97842)

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.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
bersbersberscommented, Jun 25, 2020

@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).

I am not sure. I’d say “no”, I get this prompt the first time I open the “Test” panel in each session.

I cannot say if automatic test discovery is on or not, but I have set this in my user settings:

"python.testing.autoTestDiscoverOnSaveEnabled": false,

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, 

Seems plausible, but does not work. This is my docs repo .vscode/settings.json:

{
    "python.testing.promptToConfigure": false,
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": false,
    "python.testing.nosetestsEnabled": false,
}

Still,

  1. I get the “No test framework configured (unittest, pytest or nosetest)” prompt
  2. When clicking “Discover Tests”, I still get a prompt to select the workspace (code or doc - where doc makes no sense, so the whole prompt makes no sense as only a single option remains).
0reactions
karrtikrcommented, Dec 22, 2022

I see, I’m closing this issue for now, feel free to leave a comment if anyone sees this and we’ll be happy to have a look again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing Python in Visual Studio Code
Specifies whether to enable or disable auto run test discovery when saving a test file. You may need to reload the window after...
Read more >
Chapter 2. System Discovery, Installation, and Configuration
This chapter describes how to use the SGI Tempo systems management software to discovery, install, and configure your Altix ICE system and covers...
Read more >
Language Server Protocol Specification - 3.17
Note: edits to this specification can be made via a pull request against this markdown document. What's new in 3.17. All new 3.17...
Read more >
Diff - cab4e4c43f92582a2bfc026137b3d8a175bd0360^2 ...
diff --git a/Documentation/ABI/testing/sysfs-class-regulator ... In either case, -when this text talks about enabling or disabling MSI on a "device ...
Read more >
Changing standard (Python) test discovery - Pytest
The --ignore-glob option allows to ignore test file paths based on Unix shell-style wildcards. If you want to exclude test-modules that end with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found