I have the following tox.ini
file:
[tox]
envlist = flake8,py{35,36,37,38}{,-keyring}
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
deps =
.[test]
keyring: .[keyring]
setenv =
COVERAGE_FILE = .coverage.{envname}
commands=
pytest {toxinidir}/tests -n 4 {posargs}
[testenv:flake8]
basepython = python3
deps = flake8
commands=
flake8 src tests
[flake8]
ignore: F401,E402,E501,W605,W503
When I run the tox
command, it creates a .tox
folder containing a folder for every environment specified in the [tox]
section of the tox.ini
.
I would like to automatically get rid of these particular folders after the test have succeeded when running tox
without having to manually run rm -rf .tox/NAME_OF_THE_ENV
. I have searched through the tox documentation but I have found nothing.
Is it possible to do so? If yes, how?