Add "--parallel=auto" option to the "test" command.
The --parallel
flag to test
is used as a binary "on" to mean "on all cores." But it also tries to parse the value after it as a number. This is annoying as there's no easy way to alias it as "on", since when adding a test name afterwards it is parsed as an integer:
$ python manage.py test --parallel example.core.tests.test_a
usage: manage.py test [-h] [--noinput] [--failfast] ...
manage.py test: error: argument --parallel: invalid int value: 'example.core.tests.test_a'
Pytest's xdist plugin supports the value "auto" to mean "all cores." I suggest we copy that.
Change History
(16)
Owner: |
changed from nobody to Adam Johnson
|
Summary: |
Add ability to specify "all cores" to "test --parallel" → Add "--parallel=auto" option to the "test" command.
|
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Cleanup/optimization → New feature
|
Triage Stage: |
Accepted → Ready for checkin
|
Patch needs improvement: |
set
|
Triage Stage: |
Ready for checkin → Accepted
|
Cc: |
Sergey Fedoseev added
|
Cc: |
Sergey Fedoseev removed
|
Patch needs improvement: |
unset
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
PR