Skip to content

Commit fd395ce

Browse files
committed
Add tox labels to more easily run just a subset of the thing
The label can be selected with `-m` on most tox commands, this is equivalent to selecting the corresponding envs using `-e`. - `test` runs all the tests, in all python versions - `check` runs the non-test checks - `pypy` and `cpy` run the tests for their respective Python implementation This is way more convenient when leveraging `posargs` as most of the tools are not posargs-compatible. Also easier than typing the envs in full. The only drawback is `tox list` does not display the labels. Also use brace expansions for cleaner definitions (and easier updates), in both envlist and labels.
1 parent f6fb0e2 commit fd395ce

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
[tox]
22
min_version = 4.0
3-
env_list = py38, py39, py310, py311,
4-
pypy3.8, pypy3.9,
3+
env_list = py3{8,9,10,11}
4+
pypy3.{8,9}
55
flake8, black
6+
labels =
7+
test = py3{8,9,10,11},pypy3.{8,9}
8+
cpy = py3{8,9,10,11}
9+
pypy = pypy3.{8,9}
10+
check = flake8, black
611

712
[testenv]
813
# wheel install

0 commit comments

Comments
 (0)