Is it any way how to add mutually exclusive group in pytest_addoption
pytest hook? I tried code below but it raised next error - AttributeError: 'Parser' object has no attribute 'optparser'
def pytest_addoption(parser):
group = parser.optparser.add_mutually_exclusive_group(required=True)
group.add_argument('--foo', default=False)
group.add_argument('--bar', default=False)
Thanks in advance for your help!