diff --git a/docs/sphinx/development.rst b/docs/sphinx/development.rst index 82366e4..c20190d 100644 --- a/docs/sphinx/development.rst +++ b/docs/sphinx/development.rst @@ -79,7 +79,7 @@ for some examples. Since this takes some time, benchmarks are not run with the default test suite, but has to be enabled like so:: - $ pytest --benchmarks + $ tox -e benchmarks Code diff --git a/tox.ini b/tox.ini index 7f5f6b7..9d64302 100644 --- a/tox.ini +++ b/tox.ini @@ -75,8 +75,6 @@ description = Reformat python code using ruff (Black, isort, and pyupgrade) skip_install = true deps = ruff -allowlist_externals = - bash changedir = {toxinidir} commands = ruff check --fix nutree tests setup.py @@ -99,3 +97,17 @@ deps = commands = # http://www.sphinx-doc.org/en/master/man/sphinx-build.html sphinx-build -b html sphinx sphinx-build + +[testenv:benchmarks] +description = Run 'pytest --benchmarks' on all Python versions +; envlist = py38, py39, py310, py311, py312 +skip_install = true +changedir = {toxinidir} +basepython = py312 +; basepython = py39 +; basepython = py{38, 39} +; deps = +; pytest +commands = + python -V + pytest -k test_bench -o addopts="" --benchmarks