Skip to content

Tests not being discovered since 2019.4.0 #5458

@cdietschrun

Description

@cdietschrun

Environment data

  • VS Code version: 1.33.1
  • Extension version (available under the Extensions sidebar): 2019.4.11987
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.6 in my virtualenv
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
  • Relevant/affected Python packages and their versions: tests?

Expected behaviour

Discover Python unit tests should pick up unit tests (excluding ones I want ignored), mark the unit tests in the source file with the 'debug test|run test' annotations, and running unit tests should only run my tests. This was working prior to yesterday.

Actual behaviour

Discover unit tests includes directories I've asked to be ignored in python.testing.pyTestArgs, unit test source files are not marked with annotations, and all tests run. Also I'm not seeing the results of Discover Unit Tests anywhere after run it.

Steps to reproduce:

  1. My workspace settings file has these settings:

``

Logs

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

		"python.linting.ignorePatterns": [
			".vscode/*.py",
			"**/site-packages/**/*.py",
			"cps_python_packages",
			"tests",
			"context.py"
		],
		"python.linting.pylintArgs": [
			"--rcfile", 
			"C:\\Users\\me\\source\\repos\\mason\\.pylintrc"
		],
		"python.testing.pyTestArgs": [
			"--ignore=${workspaceFolder}/mason/cps_python_packages/cps_datamodel/tests"
		],

and cps_python_packages shouldn't be linted or tested, but is being linted and tested. I have no user settings affecting this.

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)

None relevant so far as I can tell

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-testingbugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous release

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions