Nosetests - Running test always runs the test twice
See original GitHub issueEnvironment data
- VS Code version: 1.35.1
- Extension version (available under the Extensions sidebar): 2019.5.18875
- OS and version: Ubuntu 18.04
- Python version (& distribution if applicable, e.g. Anaconda): 3.6.7 and 3.6.8
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
- Jedi or Language Server? (i.e. what is
"python.jediEnabled"
set to; more info #3977): Both
Expected behaviour
Test runs once
Actual behaviour
Test runs twice
Steps to reproduce:
Use the repo here: https://github.com/amittleider/vscode_multi_workspace_bug_repro , which is configured for nosetests. Run the test discovery and click the “Run test” code lens. It will run the same test twice (you know because there are 2 dots in the Python Test Log window).
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Python nosetests runs tests twice - Stack Overflow
I'm setting up a Python Continuous Integration server, using Jenkins, and nosetests keeps running the same tests twice. I'm not importing the tests...
Read more >Writing tests — nose 1.3.7 documentation - Read the Docs
TestCase-derived tests and other test classes are run in alphabetical order. ... As with py.test or unittest fixtures, setup always runs before any...
Read more >Running Tests in Parallel with Multiple Processes - nose2
Tests are distributed by name. This means that tests always load twice – once in the main process, during initial collection, and then...
Read more >Why does my test run twice? - Visual Studio Feedback
The problem I'm encountering is that each of these tests run twice. I've tried countless different configurations but it always runs 2x each...
Read more >EX46: nosetests ran 0 tests or ran 1 tests with Error - Python
setuptools 42.0.2; virtualenv 16.7.9; wheel 0.33.6. By the same issue I mean that when I run nosetests I get the Ran 0 tests...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm this issue is still happening - when I debug the test only happens once
If I use the “Run all tests” button (at the top), the tests will only run once. If I run only the tests of
upper_level_project
, the tests are run twice. Here’s a gif.