How to call fixtures if cli is not given and call fixtures when cli is given. #10197
Unanswered
Montekkundan
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I made these fixtures in my
conftest.py
:And I have a test case in my test folder like this:
How can i make a combined fixture which i can even use in my test cases, so that when i don't input any cli command like :
pytest --chrome
it runs the setup fixture and when i run a cli command it ignores the setup fixture and runs the specific fixture that i've mentioned.eg:
pytest --chrome
- > test runs with chrome fixturepytest --chrome --firfox
- > test runs with chrome as well as firefox fixturepytest
- > test runs only setup fixture.Beta Was this translation helpful? Give feedback.
All reactions