Mam katalog projektu wygląda popy.test: error: nierozpoznane argumenty
Projects/
....this_project/
........this_project/
............__init__.py
............code.py
............tests/
................conftest.py
................test_1.py
................test_2.py
i dodałem opcję wiersza poleceń (--PALLADIUM_CONFIG) umieszczając następujące kody do conftest.py
def pytest_addoption(parser):
parser.addoption("--PALLADIUM_CONFIG", action="store")
@pytest.fixture
def PALLADIUM_CONFIG(request):
return request.config.getoption("--PALLADIUM_CONFIG")
I co dziwne:
gdybym cd do
Projects/this_project/this_project
lub
Projects/this_project/this_project/tests
i uruchomić
py.test --PALLADIUM_CONFIG=***
jeśli działa dobrze
ale gdybym znaleźć się w na przykład
Projects/this_project
lub
Projects
następnie pytest daje mi błąd
py.test: error: unrecognized arguments: --PALLADIUM_CONFIG=***