Opened 3 weeks ago
Last modified 3 weeks ago
#36596 assigned Bug
django_test_expected_failures has no effect on the parallel test runner in "spawn" mode
Reported by: | Jacob Walls | Owned by: | titilayo odufowoke |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | multiprocessing |
Cc: | Tim Graham | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
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 (3)
comment:1 by , 3 weeks ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 3 weeks ago
Description: | modified (diff) |
---|
comment:3 by , 3 weeks ago
Owner: | set to |
---|---|
Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.