-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
I'm encountering an error when attempting to add --alluredir in conftest.py. The error message points to a conflict in argparse.py:
\AppData\Local\Programs\Python\Python311\Lib\argparse.py", line 1621, in _handle_conflict_error
raise ArgumentError(action, message % conflict_string)
It seems that --alluredir is already registered, causing a conflict. What would be the best approach to handle this and set a default directory without overriding existing configurations? Our target is to check if the allure key is set to true into our configuration before running the --alluredir
pytest and operating system
- OS = Windows 11
- Pytest = 7.4.0
Code example
def pytest_addoption(parser):
if config.settings.allure:
parser.addoption("--alluredir", default="allure-results", action="store")
Metadata
Metadata
Assignees
Labels
No labels