-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be nice an option in the dependency that force to collect and execute the required test. For example:
import pytest
@pytest.mark.dependency()
@pytest.mark.xfail(reason="deliberate fail")
def test_a():
assert False
@pytest.mark.dependency()
def test_b():
pass
@pytest.mark.dependency(depends=["test_a"])
def test_c():
pass
@pytest.mark.dependency(depends=["test_b"], collect=True)
def test_d():
pass
@pytest.mark.dependency(depends=["test_b", "test_c"])
def test_e():
pass
if execute only the test_d
the collector also will select the test_b
because the hard restriction of the dependency collect=True
If you think this is a good idea I can work on this feature. kind regards
a-recknagel, marcinwrochna, otto-tamas, akingscote and pkludig
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request