Replies: 1 comment 2 replies
-
Hi @nmt1 why not just specify the -x | --exit-first flag in the pytest.ini directly via addopts = --strict -x. I would also like to point you to the --max-fail flag as thats possibly something of interest to you also (if you are in and around Now if you must use the env vars via jenkins as mentioned in your original comment, this is available:
Please let me know if this is useful for you, if you have any other questions I can try my best to assist you. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
description
I don't understand how I can change the addopts in pytest.
I am not sure what is the approach, and can't find a clear/strict way within the pytest documentation.
content of pytest.ini
[pytest]
addopts = --strict
content of conftest.py
exitfirst = os.getenv("env_exitfirst", "false") # typically controlled via Jenkins
if exitfirst == "true":
write --exitfirst to addopts?
Beta Was this translation helpful? Give feedback.
All reactions