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.

Don't display 'No tests discovered' dialog before test functionality is used

See original GitHub issue

Environment data

  • VS Code version: 1.31.1
  • Extension version (available under the Extensions sidebar): 2019.2.5433
  • OS and version: 10.4.3

Expected behaviour

If I don’t have a unit test file, I don’t receive any test-related messages from VSCode by default.

Actual behaviour

I have unit testing enabled in my user settings, since most of my projects do have unit testing. But if I happen to open a folder that doesn’t have tests, I instantly receive a dialog that says “No tests discovered, please check the configuration settings for the tests” that stays in the workspace indefinitely until I manually dismiss it.

I find this kind of annoying - can’t this dialog be suppressed by default until I try to use test-related functionality, like running the 'Discover unit tests" command?

Steps to reproduce:

  1. Enable `python.unitTest.pyTestEnabled’ in the user-wide settings.json.
  2. Open a directory containing a Python file with VSCode.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ericsnowcurrentlycommented, Mar 4, 2019

@malmaud, thanks for letting us know about this. Yeah, that is definitely something we will look into fixing.

0reactions
malmaudcommented, Apr 3, 2019

Ok, makes sense. Thanks!

On Tue, Apr 2, 2019 at 7:23 PM Luciana Abud notifications@github.com wrote:

@malmaud https://github.com/malmaud The prompt will be shown if you enable a test framework in your settings. When you enable it in the user settings, this is the expected behavior. One way to avoid this would be to open the folder you’re working on as a workspace and disable the tests frameworks in the workspace settings.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode-python/issues/4614#issuecomment-479251570, or mute the thread https://github.com/notifications/unsubscribe-auth/AA8SvRtzTqYCf14tzeI3zC1frj_klyPxks5vc-aOgaJpZM4bZu56 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code not finding pytest tests - python - Stack Overflow
pytest_cache/v/cache/nodeids contains all the tests, but I still get the dialog complaining about No tests discovered . Python 3.7.2; macOS ...
Read more >
Run unit tests with Test Explorer - Visual Studio (Windows)
If Test Explorer is not visible, choose Test on the Visual Studio menu, choose Windows, and then choose Test Explorer (or press Ctrl...
Read more >
Why does PyCharm not run pytest testing for my application?
I want to test the db.py module. I configure pycharm to use pytest as my test runner ( I verified this). When I...
Read more >
HP QTP Certification Dumps - HP0-M47 & HP0-M98 Exam ...
220 QTP Certification Dumps with Answers. Helpful Question and Answers to Clear QTP 11.0 Certification Exams (HP0-M47 & HP0-M98) - HP UFT ...
Read more >
6 THINGS TO TRY WHEN QTP DOES NOT RECOGNIZE AN ...
1.Check the loaded add-ins : ... It's pretty basic, but be sure you have the correct add-ins selected. If QTP is only recognizing...
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