Skip to content

Commit

Permalink
Add tox -e benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Sep 22, 2024
1 parent 9a53c9c commit 22f3d30
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/sphinx/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 22f3d30

Please sign in to comment.