forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as not planned
Labels
area-testingbugIssue 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 on
Description
Behaviour
Expected vs. Actual
This bug occurs with pytest version 6.2.5. All tests should be visible in the Test Explorer, with classes (e.g. class TestWidget) appearing as nested levels in the hierarchy.
However, if a test class is present (or multiple test classes), all other tests are hidden except for the tests in that class.
Steps to reproduce:
- Define a test file
test_example.pywith the following text:def test_one(): pass class TestExample: def test_two(): pass
- Run test discovery in the Test Explorer.
- Only test_two is visible.
- If you delete
TestExample, then test_one becomes visible again.
Diagnostic data
- Extension version: v2023.21.13131007
- Python version (& distribution if applicable, e.g. Anaconda): 3.9.12
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
- Value of the
python.languageServersetting: Pylance
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
<Module test_example.py>
<Function test_outer>
2023-11-09 15:40:25.183 [info]
<Class TestClass>
<Function test_inner>
User Settings
languageServer: "Pylance"
testing
• pytestArgs: "-vv"
• pytestEnabled: true
Hamza-Q and ooloth
Metadata
Metadata
Assignees
Labels
area-testingbugIssue 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 on