Skip to content

Commit 6b702d1

Browse files
Merge pull request #24 from hickeyma/fix-tox-py-ver
tox: Add base Python version to tox environment
2 parents 404d479 + fd9ed0d commit 6b702d1

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tox.ini

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py, lint, fmt
2+
envlist = fmt, lint, unit
33
minversion = 4.4
44

55
[testenv]
@@ -11,18 +11,26 @@ wheel_build_env = pkg
1111
deps =
1212
pytest
1313
commands =
14-
pytest {posargs:tests}
14+
unit: {basepython} -m pytest {posargs:tests}
15+
16+
[testenv:py3]
17+
basepython = python3.11
18+
19+
[testenv:unit]
20+
basepython = {[testenv:py3]basepython}
1521

1622
[testenv:lint]
23+
basepython = {[testenv:py3]basepython}
1724
description = lint with pylint
1825
deps =
1926
pytest
2027
pylint>=2.16.2,<4.0
2128
pylint-pydantic
2229
commands =
23-
{envpython} -m pylint --load-plugins pylint_pydantic fms_mo/ tests/
30+
{basepython} -m pylint --load-plugins pylint_pydantic fms_mo/ tests/
2431

2532
[testenv:fmt]
33+
basepython = {[testenv:py3]basepython}
2634
description = format with pre-commit
2735
deps =
2836
pre-commit
@@ -43,3 +51,9 @@ commands =
4351
coverage report -m
4452
coverage xml
4553
genbadge coverage -s -i coverage.xml
54+
55+
[gh]
56+
python =
57+
3.11 = 3.11
58+
3.10 = 3.10
59+
3.9 = 3.9

0 commit comments

Comments
 (0)