Skip to content

Folders named 'py' result in "Test result not found" #17414

@botsman

Description

@botsman

Environment data

  • VS Code version: 1.60.0
  • Extension version (available under the Extensions sidebar): v2021.9.1230869389
  • OS and version: MacOS 11.6
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pyenv
  • Relevant/affected Python packages and their versions: pytest==6.2.5
  • Value of the python.languageServer setting: Pylance

Expected behaviour

This simple test should appear succeeded in UI :

def test_passing():
   assert 42 == 42

Actual behaviour

The test is failed (red circle) with this reason :
image

Steps to reproduce:

The issue is very similar to #17270 which is closed by #17275

The only difference that in my case folder name is not starting with "py", but the whole folder name is "py":
image

  1. Have pytest installed and selected as a default test framework
  2. Put tests inside folder named "py". For example, "./tests/py/"
  3. Try to execute test
  4. The test is executed correctly, but test UI shows error.

Logs

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

> ~/.pyenv/versions/3.9.1/envs/vscode_python_pytest/bin/python -m pytest --rootdir ~/projects/vscode_python_pytest --override-ini junit_family=xunit1 --junit-xml=/var/folders/0_/6w94lk1171vc_fpwbjqx02nw0000gn/T/tmp-14897brlMlEUuYALH.xml ./tests/py/test_something.py::test_passing
cwd: ~/projects/vscode_python_pytest

Metadata

Metadata

Assignees

Labels

area-testingauthor-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions