add CLI arg value if not present (--junitxml) #8997
-
I need to be able to add a dynamic default value for --junitxml, if it is not present based on other ini an cil args present. Currently I am using I have another ini/cli option I add, The place to do this seemed to be in my How can I manage to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @choppsv1, The internal JUnitXML plugin also checks the options in pytest/src/_pytest/junitxml.py Lines 426 to 427 in 2439729 Given that external plugins execute first, and then internal ones, your |
Beta Was this translation helpful? Give feedback.
Hi @choppsv1,
The internal JUnitXML plugin also checks the options in
pytest_configure
:pytest/src/_pytest/junitxml.py
Lines 426 to 427 in 2439729
Given that external plugins execute first, and then internal ones, your
pytest_configure()
should be able to setconfig.option.xmlpath
beforejunitxml
plugin gets to it. Perhaps you are settingconfig.option.junitxml
(after the command-line argument)?