diff --git a/docs/changelog/3261.feature.rst b/docs/changelog/3261.feature.rst new file mode 100644 index 000000000..f07f3d74b --- /dev/null +++ b/docs/changelog/3261.feature.rst @@ -0,0 +1 @@ +Add support for multiple appending override options (-x, --override) on command line - by :user:`amitschang`. diff --git a/docs/config.rst b/docs/config.rst index 840924e58..0d40027d6 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -1037,7 +1037,7 @@ You could add additional dependencies by running: .. code-block:: bash - tox --override testenv.deps+=pytest-xdist,pytest-cov + tox --override testenv.deps+=pytest-xdist You could set additional environment variables by running: @@ -1045,6 +1045,19 @@ You could set additional environment variables by running: tox --override testenv.setenv+=baz=quux +You can specify overrides multiple times on the command line to append multiple items: + +.. code-block:: bash + + tox -x testenv.seteenv+=foo=bar -x testenv.setenv+=baz=quux + tox -x testenv.deps+=pytest-xdist -x testenv.deps+=pytest-cov + +Or reset override and append to that (note the first override is ``=`` and not ``+=``): + +.. code-block:: bash + + tox -x testenv.deps=pytest-xdist -x testenv.deps+=pytest-cov + Set CLI flags via environment variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All CLI flags can be set via environment variables too, the naming convention here is ``TOX_