-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Environment data
- VSCode Version: May 2018 (1.24)
- Extension version (available under the Extensions sidebar): 2018.6.0
- OS and version: Windows 10
- Python version (& distribution if applicable, e.g. Anaconda): 2.7.14
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): NA
- Relevant/affected Python packages and their versions: NA
Actual behavior
I use VS code for my Python projects and we have unit tests written using Python's unittest module. I am facing a weird issue with debugging unit tests.
Let's say I have 20 unit tests in a particular project.
I run the tests by right clicking on a unit test file and click 'Run all unit tests' After the run is complete, the results bar displays how many tests are passed and how many are failed. (e.g. 15 passed, 5 failed).
And I can run/debug individual test because there is a small link on every unit test function for that. If I re-run the tests from same file, then the results bar displays the twice number of tests. (e.g. 30 passed, 10 failed)
Also the links against individual test functions disappear. So I cannot run individual tests.
The only way to be able to run/debug individual tests after this is by re-launching the VS code.
Expected behavior
Re-run of unit tests should not double the number.
Individual test functions debugging should be possible.
Steps to reproduce:
Run the python tests by right clicking on a unit test file and click 'Run all unit tests'.
After the run is complete, the results bar displays how many tests are passed and how many are failed. (e.g. 15 passed, 5 failed). And you can run/debug individual test because there is a small link on every unit test function for that.
Now re-run the tests from same file, then the results bar displays the twice number of tests.
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Starting the classic analysis engine.
##########Linting Output - pylint##########
No config file found, using default configuration
Your code has been rated at 9.95/10 (previous run: 9.72/10, +0.23)
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)
[Extension Host] Python Extension: Error: read ECONNRESET
t.log @ workbench.main.js:sourcemap:270