Skip to content

Execute the current unittest file not executing all tests #4567

@Ronkiro

Description

@Ronkiro

Environment data

  • VS Code version: 1.31.1
  • Extension version (available under the Extensions sidebar): 2019.2.5416
  • OS and version: W10 Enterprise 10.0.17134
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: Extension

Expected behaviour

Run all unittests on file

Actual behaviour

Runs only the first unittest.

Steps to reproduce:

  1. Create an unittest class. (class Class(unittest.TestCase):)
  2. Add a method to test.
  3. Add another method to test.
  4. Click right mouse button.
  5. Click "Execute the current unittest file" (Translated from Portuguese, not sure if it's exactly how it shows.
  6. Just the first test will execute, ignoring all others.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

test_instancia (test.test_api_infobip.InfobipTestCase) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.001s

OK

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

[Extension Host] Python Extension: Cached data exists getEnvironmentVariables, c:\Programas\servicosmsf_v2
console.ts:134 [Extension Host] Python Extension: Cached data exists ActivatedEnvironmentVariables, c:\Programas\servicosmsf_v2
console.ts:134 [Extension Host] Python Extension: getActivatedEnvironmentVariables, Class name = b, Arg 1: <Uri:c:\Programas\servicosmsf_v2>, Arg 2: undefined
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, c:\Programas\servicosmsf_v2
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, extension-output-#5

Metadata

Metadata

Assignees

Labels

area-testingbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions