forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation pendingThe issue needs to be confirmed through a maintainer reproducing the bug.The issue needs to be confirmed through a maintainer reproducing the bug.
Description
Type: Bug
Behaviour
Testing shows a passed pytest test, even though subtests failed.
Steps to reproduce:
- Create
test_foo.pywith following content:
def test_bar(subtests):
# with subtests.test("True"):
# assert True
with subtests.test("ValueError"):
raise ValueError()
- Set up testing to discover test
- run test & see that it shows as failed (expected)
- now uncomment the first subtest
- run test & see that for whatever reason it shows as passed, even though nothing was changed about the second test.
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
2025-12-05 13:31:31.472 [info] ============================= test session starts =============================
platform win32 -- Python 3.12.6, pytest-9.0.1, pluggy-1.6.0
2025-12-05 13:31:31.474 [info] rootdir: d:\Random\pytest_vscode_bug
plugins: dash-3.0.0
2025-12-05 13:31:31.478 [info] collected 1 item
2025-12-05 13:31:31.478 [info] <Dir pytest_vscode_bug>
<Module test_foo.py>
<Function test_bar>
2025-12-05 13:31:31.479 [info]
========================== 1 test collected in 0.01s ==========================
Metadata
Metadata
Assignees
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation pendingThe issue needs to be confirmed through a maintainer reproducing the bug.The issue needs to be confirmed through a maintainer reproducing the bug.