Open
Description
It would be nice if it was possible to keep track of the tests that were passed or that all subtests either passed or not.
For example:
import pytest
from pytest_subtests import SubTests
def test_something(subtests: SubTests):
with subtests.test(msg="some subtest"):
assert False
with subtests.test(msg="some subtest"):
assert True
# Suggested additional code
assert subtests.passed, "Some subtests failed"
This would make it so that I could explicitly fail a test based on failed subtests. Sometimes a test might additionally be made of of just subtests as well. It looks misleading that my test PASSED
while the subtests failed. So it didn't actually pass.
Metadata
Metadata
Assignees
Labels
No labels