summaryrefslogtreecommitdiff
path: root/django/test/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/test/runner.py')
-rw-r--r--django/test/runner.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/django/test/runner.py b/django/test/runner.py
index 25089a6db1..41c9dbd10c 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -463,9 +463,6 @@ def _init_worker(
process_setup(*process_setup_args)
django.setup()
setup_test_environment(debug=debug_mode)
- call_command(
- "check", stdout=io.StringIO(), stderr=io.StringIO(), databases=used_aliases
- )
db_aliases = used_aliases if used_aliases is not None else connections
for alias in db_aliases:
@@ -477,6 +474,11 @@ def _init_worker(
connection._test_serialized_contents = value
connection.creation.setup_worker_connection(_worker_id)
+ if is_spawn_or_forkserver:
+ call_command(
+ "check", stdout=io.StringIO(), stderr=io.StringIO(), databases=used_aliases
+ )
+
def _run_subsuite(args):
"""