summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2022-09-28 09:02:25 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-09-28 19:39:25 +0200
commit4a910f3de35338df7d4fcd8b7729fd1e31edaad0 (patch)
treed91f0846bd5db5acd78d484870af82640c1435f1 /django/test
parentfa3afc5d86f1f040922cca2029d6a34301597a70 (diff)
Fixed #34010 -- Made parallel tests using spawn set up Django.
Bug in 3b3f38b3b09b0f2373e51406ecb8c9c45d36aebc. Thanks Kevin Renskers for the report.
Diffstat (limited to 'django/test')
-rw-r--r--django/test/runner.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/test/runner.py b/django/test/runner.py
index 24ce766ce1..f2a91373b1 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -17,6 +17,7 @@ from contextlib import contextmanager
from importlib import import_module
from io import StringIO
+import django
from django.core.management import call_command
from django.db import connections
from django.test import SimpleTestCase, TestCase
@@ -418,6 +419,7 @@ def _init_worker(
if process_setup_args is None:
process_setup_args = ()
process_setup(*process_setup_args)
+ django.setup()
setup_test_environment()
for alias in connections: