django_test_skips and django_test_expected_failures have no effect on the parallel test runner in "spawn" mode
The django_test_expected_failures attribute has no effect on the parallel test runner in "spawn" multiprocessing mode, because it uses setattr to monkey-patch a class, and that patching is lost when workers are spawned.
To reproduce:
- add
multiprocessing.set_start_method("spawn") near the top of runtests.py if not running on MacOS or Windows
- adjust postgres database settings to include
"OPTIONS": { "server_side_binding": True} (to trigger an expected failure),
./runtests.py aggregation.tests --settings=test_postgres --parallel=1 : passes
./runtests.py aggregation.tests --settings=test_postgres: fails
Python will be defaulting all systems into "spawn" by default in Python 3.14, so we're about to see more traffic into this.
Change History
(8)
| Triage Stage: |
Unreviewed → Accepted
|
| Description: |
modified (diff)
|
| Owner: |
set to titilayo odufowoke
|
| Status: |
new → assigned
|
| Summary: |
django_test_expected_failures has no effect on the parallel test runner in "spawn" mode → django_test_skips and django_test_expected_failures have no effect on the parallel test runner in "spawn" mode
|
| Has patch: |
set
|
| Owner: |
changed from titilayo odufowoke to Mariusz Felisiak
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
PR