forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area-testingauthor-verification-requestedIssues potentially verifiable by issue authorIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked onverifiedVerification succeededVerification succeeded
Milestone
Description
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.languageServersetting: 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 :

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":

- Have pytest installed and selected as a default test framework
- Put tests inside folder named "py". For example, "./tests/py/"
- Try to execute test
- The test is executed correctly, but test UI shows error.
Logs
Output for Python in the Output panel (View→Output, 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
Jinksi and botsman
Metadata
Metadata
Assignees
Labels
area-testingauthor-verification-requestedIssues potentially verifiable by issue authorIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked onverifiedVerification succeededVerification succeeded