-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Hi all,
The freshly released pytest 9.0 comes with the new "subtests" fixture, with which I played around a bit. I would have expected the rerunfailures plugin to handle a test with failed subtests as failed and therefore trigger a rerun, but it doesn't. Is this intended behaviour or just not supported yet?
I can reproduce this issue with pytest 9.0 or with pytest 8.2 + pytest-subtests plugin.
Example code:
counter1 = 0
counter2 = 0
def test_not_working(subtests):
global counter1
counter1 += 1
with subtests.test():
assert counter1 > 1, "If this test was rerun, this would succeed"
def test_working():
global counter2
counter2 += 1
assert counter2 > 1, "If this test was rerun, this would succeed"
Metadata
Metadata
Assignees
Labels
No labels