-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
topic: configrelated to config handling, argument parsing and config filerelated to config handling, argument parsing and config filetype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
Scenario tested
tests/
test.py
pytest.ini
pytest2.ini
The contents of test.py
from pathlib import Path
def test_root(pytestconfig):
assert Path(pytestconfig.rootpath).resolve().absolute() == Path('.').resolve().absolute()
pytest.ini
and pytest2.ini
are the same
- When running
pytest tests/
the test is passing (correct rootdir is printed):rootdir: D:\pytest, configfile: pytest.ini
- When running
pytest tests/ -c pytest2.ini
the test is failing (wrong rootdir and config are reported) :rootdir: D:\pytest\tests, configfile: ..\pytest2.ini
Please let me know if I can submit a fix for this :)
Metadata
Metadata
Assignees
Labels
topic: configrelated to config handling, argument parsing and config filerelated to config handling, argument parsing and config filetype: bugproblem that needs to be addressedproblem that needs to be addressed