New issue 482: pytest_addoption doesn't allow parameters which is the path to
an existing file
https://bitbucket.org/hpk42/pytest/issue/482/pytest_addoption-doesnt-allow-parameters
Roy van de Korput:
I've created an custom option:
```
#!python
def pytest_addoption(parser):
parser.addoption('--custom', help = 'The custom option to be used.',
required = True)
@pytest.fixture
def custom(request):
return request.config.getoption("--custom")
```
Now in the folder there is a file named 'custom.example'
If I pass "py.test -v -s --custom custom.example" I get this error:
"py.test-script.py: error: unrecognized arguments: --custom"
It works when I call with an parameter which is not a file: "py.test -v -s
--custom custom.example.doesnotexist".
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit