#27734: Add a helpful error message when a parallel test worker is assigned an
unexpected index
--------------------------------------+------------------------------------
Reporter: Adam Wróbel | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: 1.10
Severity: Normal | Resolution:
Keywords: parallel | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Hameed Gifford):
To anyone else who's still having this problem, it seems to be specific to
OSX. Or at least this reason and fix is.
https://stackoverflow.com/questions/50168647/multiprocessing-causes-
python-to-crash-and-gives-an-error-may-have-been-in-progr
Putting this somewhere in your code before the test runner is initialized
(settings worked good for me) fixes the issue:
{{{
import os
import platform
import sys
if 'test' in sys.argv and platform.system().lower() == 'darwin':
os.environ.setdefault('OBJC_DISABLE_INITIALIZE_FORK_SAFETY', 'YES')
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27734#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/061.b3c192b2d1f4f684e67f22d386b33685%40djangoproject.com.