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.

Nosetests - Running test always runs the test twice

See original GitHub issue

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

always_runs_twice

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

1reaction
djpltcommented, Feb 12, 2021

I can confirm this issue is still happening - when I debug the test only happens once

1reaction
amittleidercommented, Jun 19, 2019

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.

test_explorer_results

Read more comments on GitHub >

github_iconTop 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 >

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