#31169: Allow parallel test runner to work with Windows/macOS `spawn` process
start
method.
-----------------------------------+------------------------------------
Reporter: Brandon Navra | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Carlton Gibson):
* type: Bug => New feature
* version: 3.0 => master
* stage: Unreviewed => Accepted
Comment:
Parallel running is disabled on Windows:
{{{
def default_test_processes():
"""Default number of test processes when using the --parallel
option."""
# The current implementation of the parallel test runner requires
# multiprocessing to start subprocesses with fork().
if multiprocessing.get_start_method() != 'fork':
return 1
try:
return int(os.environ['DJANGO_TEST_PROCESSES'])
except KeyError:
return multiprocessing.cpu_count()
}}}
I'll accept this as a new feature: the limitation has been there since it
was implemented.
Brandon, your patch is tiny. Is it really that simple? We'd need tests and
a few other adjustments (like to the function above) but, fancy opening a
PR?
--
Ticket URL: <https://code.djangoproject.com/ticket/31169#comment:5>
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/068.8114aae819505952ac4140f0ca1b7536%40djangoproject.com.