Skip to content

Commit 703d072

Browse files
committed
Add tox for Python testing
1 parent 564455e commit 703d072

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

examples/python/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ pytest-trio==0.8.0
55
pytest-rerunfailures==15.0
66
flake8==7.2.0
77
requests==2.32.3
8+
tox==4.25.0

examples/python/tox.ini

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Tox (https://tox.wiki/) is a tool for running tests in multiple
2+
# virtualenvs. This configuration file will run the test suite on all
3+
# supported python versions. To use it, run "tox" from this directory.
4+
#
5+
# For a specific environment, run: "tox -e <env>" (i.e.: "tox -e py313")
6+
#
7+
# This tox configuration will skip any Python interpreters that can't be found.
8+
# To manage multiple Python interpreters for covering all versions, you can use
9+
# pyenv: https://github.com/pyenv/pyenv
10+
11+
12+
[tox]
13+
env_list =
14+
py39
15+
py310
16+
py311
17+
py312
18+
py313
19+
skip_missing_interpreters = True
20+
21+
[testenv]
22+
description = run tests
23+
passenv = *
24+
deps =
25+
-r requirements.txt
26+
commands =
27+
# "-vv" means extra verbose
28+
# "-r fEsxXp" means show extra test summary info as specified by:
29+
# (f)ailed, (E)rror, (s)kipped, (x)failed, (X)passed, (p)assed
30+
pytest -vv -r fEsxXp {posargs:.}

0 commit comments

Comments
 (0)