Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency between two tests #53

Closed
jcalienni opened this issue Jul 29, 2021 · 1 comment · Fixed by #59
Closed

Dependency between two tests #53

jcalienni opened this issue Jul 29, 2021 · 1 comment · Fixed by #59
Labels
support Issue induced by the requester not fully understanding the software rather then by a misbehavior

Comments

@jcalienni
Copy link

Hello, i have a question:
Is it possible to add dependency with two tests but exclusive?
Let me explain my self:
With this line "@pytest.mark.dependency(depends=["test_b", "test_c"])", both test_b and test_c should pass for the test to run.
What i want to do is if at least one of the tests pass the test should run. So if test_b pass and test_c fails it should run anyways. The only way the test shouldn't run if both tests fails.
image

I know this questions migth seem a bit rare, but i'm trying to create a workaroun since i'm running parallel tests with xdist and i think this would help me.

@RKrahl
Copy link
Owner

RKrahl commented Dec 24, 2021

Apologies for not replying earlier. What you ask for is not supported out of the box in pytest-dependency. But you can implement it using a small helper function. I provided an example in #57.

@RKrahl RKrahl added the support Issue induced by the requester not fully understanding the software rather then by a misbehavior label Dec 25, 2021
@RKrahl RKrahl mentioned this issue Dec 31, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Issue induced by the requester not fully understanding the software rather then by a misbehavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants