#31621: Add ability to specify "all cores" to "test --parallel"
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: nobody
(Chainz) Johnson |
Type: | Status: assigned
Cleanup/optimization |
Component: Testing | Version: master
framework |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31621>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.2f519685f483c1528ad08a2e5a875b2c%40djangoproject.com.