Battery test based on a given logic and parameterize them by fixtures #8623
Unanswered
jaraqueffdc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I have worked with pytest in the past and I loved it but for one reason or another all the project I have worked in use unittest but I found an use case where I cannot use unittest and I was hopping pytest would allow me to use it.
I am sorry if this is simple to do but I think the issue is that I do not know what to look for exactly 😅
The scenario is the following:
I have all the tests defined and I would like to be able to use those but being able to configure each set of tests because we have 3 different specifications. All tests depends on a fixture
ds
which is the specification itself but for some of them we will also need mocking which I was planning to do with a yielding fixture with autouse.However, I am not sure how to separate the three test sets so each fixture is used with the written tests as well as allowing the mocking fixtures to only apply when running for that given specification.
I am not sure it is clear but please let me know if you have any question about the intended use or any suggestion.
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions