pytest-django icon indicating copy to clipboard operation
pytest-django copied to clipboard

pytest.ini directory is not set to rootdir in 3.4.4

Open danlittlejohn opened this issue 7 years ago • 2 comments

if I set a pytest.ini file and then run pytest in a subfolder it looks like the rootdir is not longer set to the directory that pytest.ini is in. This causes the path to DJANGO_SETTINGS_MODULE to no longer be found

so if I have a directory structure like this

root --apps --test --project ----settings ------test pytest.ini

set the pytest.ini file to this

[pytest] DJANGO_SETTINGS_MODULE=project.settings.test

and then run pytest from the test folder it will find the pytest.ini file, but will then throw a "project" module not found. However, it is found if I set PYTHONPATH so maybe something that sets the rootdir broke?

PYTHONPATH=.. pytest

This happens in 3.4.4, but not 3.4.3 and earlier versions

danlittlejohn avatar Dec 18 '18 16:12 danlittlejohn

Thanks for the report. Can you git-bisect it, please?

blueyed avatar Dec 18 '18 16:12 blueyed

Might have been fixed by now. Pease re-open if it is still an issue.

blueyed avatar Feb 26 '19 15:02 blueyed