Skip to content

Commit

Permalink
Allow parallel mode without arguments (tox-dev#1559)
Browse files Browse the repository at this point in the history
Allows calling tox with `tox -p` in order to use auto mode. Previously
it was mandatory to mention `auto` in order to enable parallel mode.

This will not change behavior of tox when called without `-p`, which
will still keep the non-parallel mode.

Fixes: 1418
Signed-off-by: Sorin Sbarnea <[email protected]>
  • Loading branch information
ssbarnea committed Apr 19, 2021
1 parent fe48d2f commit e610abd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog/1418.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow parallel mode without arguments. - by :user:`ssbarnea`
4 changes: 3 additions & 1 deletion src/tox/config/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ def add_parallel_flags(parser):
parser.add_argument(
"-p",
"--parallel",
nargs="?",
const="auto",
dest="parallel",
help="run tox environments in parallel, the argument controls limit: all,"
" auto - cpu count, some positive number, zero is turn off",
" auto or missing argument - cpu count, some positive number, 0 to turn off",
action="store",
type=parse_num_processes,
default=DEFAULT_PARALLEL,
Expand Down

0 comments on commit e610abd

Please sign in to comment.