You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run pytest with xdist, I get an error that I don't get if I run the same exact command but without the -n 1 flag. Any number of processors specified is sufficient to generate the error.
django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
Do I need to do something special to avoid this? When I had this problem previously, it seemed to fix the issue when I put:
[pytest]
addopts = -p no:django
in my pytest.ini. But the problem has come back now. I tried upgrading pytest-django, but it is the same error essentially:
django.core.exceptions.ImproperlyConfigured: Requested settings, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
I understand that I can set DJANGO_SETTINGS_MODULE, but why do I need to? The tests I'm running do not import django at all and if I don't use xdist, then this isn't an issue.
The text was updated successfully, but these errors were encountered:
When I run pytest with xdist, I get an error that I don't get if I run the same exact command but without the
-n 1
flag. Any number of processors specified is sufficient to generate the error.Do I need to do something special to avoid this? When I had this problem previously, it seemed to fix the issue when I put:
in my
pytest.ini
. But the problem has come back now. I tried upgradingpytest-django
, but it is the same error essentially:I understand that I can set DJANGO_SETTINGS_MODULE, but why do I need to? The tests I'm running do not import django at all and if I don't use xdist, then this isn't an issue.
The text was updated successfully, but these errors were encountered: