﻿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
33891	TypeError when trying to run tests in parallel with spawn.	Kevin Renskers	Mariusz Felisiak	"After updating to Django 4.1 I can no longer run my tests in parallel. I get seemingly endless errors in my terminal.

{{{
(env) $ ./manage.py test --parallel
Found 124 test(s).
Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
System check identified no issues (0 silenced).
Process SpawnPoolWorker-7:
Process SpawnPoolWorker-2:
Process SpawnPoolWorker-6:
Process SpawnPoolWorker-3:
Process SpawnPoolWorker-1:
Process SpawnPoolWorker-8:
Process SpawnPoolWorker-5:
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
  File ""/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py"", line 315, in _bootstrap
    self.run()
  File ""/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py"", line 108, in run
    self._target(*self._args, **self._kwargs)
  File ""/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/pool.py"", line 109, in worker
    initializer(*initargs)
  File ""/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py"", line 315, in _bootstrap
    self.run()
  File ""/Users/kevin/Workspace/cn-django/env/lib/python3.10/site-packages/django/test/runner.py"", line 420, in _init_worker
    process_setup(*process_setup_args)
  File ""/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py"", line 108, in run
    self._target(*self._args, **self._kwargs)
  File ""/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/pool.py"", line 109, in worker
    initializer(*initargs)
  File ""/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py"", line 315, in _bootstrap
    self.run()
  File ""/opt/homebrew/Cellar/python@3.10/3.10.5/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/process.py"", line 315, in _bootstrap
    self.run()
  File ""/Users/kevin/Workspace/cn-django/env/lib/python3.10/site-packages/django/test/runner.py"", line 420, in _init_worker
    process_setup(*process_setup_args)
Traceback (most recent call last):
TypeError: ParallelTestSuite.process_setup() missing 1 required positional argument: 'self'
}}}

That traceback and error then keeps repeating.

If I run the tests just with `./manage.py test`, everything works fine."	Bug	closed	Testing framework	4.1	Release blocker	fixed		Carlton Gibson	Accepted	1	0	0	0	0	0
