﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31169	Parallel test mode not working on MacOS with recent versions of Python 3	Brandon Navra	nobody	"Python 3.8 on MacOS has changed the default start method for the multiprocessing module from `fork` to `spawn`: https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods.

When running tests with the `--parallel` flag, this causes the worker processes to fail with {{{django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.}}} as they no longer have a copy of the parent memory state. It can also cause the workers to fail to find the cloned dbs ({{django.db.utils.OperationalError: FATAL:  database ""xxx_1"" does not exist}}) as the db test prefix is missing.

I have attached a patch which changes `django.test.runner._init_worker` (the worker initialiser for `ParallelTestSuite`) to run django.setup() and set the db name to one with the `test_` prefix."	Bug	new	Testing framework	3.0	Normal				Unreviewed	0	0	0	0	0	0
