Skip to content

Commit 1256b16

Browse files
authored
Merge pull request #1667 from EliahKagan/tox
Configure tox
2 parents be248aa + e6ec6c8 commit 1256b16

File tree

3 files changed

+35
-4
lines changed

3 files changed

+35
-4
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ nbproject
2525
.pytest_cache/
2626
monkeytype.sqlite3
2727
output.txt
28-
tox.ini

requirements-dev.txt

-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@ flake8-type-checking;python_version>="3.8" # checks for TYPE_CHECKING only
77

88
pytest-icdiff
99
# pytest-profiling
10-
11-
12-
tox

tox.ini

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[tox]
2+
requires = tox>=4
3+
env_list = py{37,38,39,310,311,312}, lint, mypy, black
4+
5+
[testenv]
6+
description = Run unit tests
7+
package = wheel
8+
extras = test
9+
pass_env = SSH_*
10+
commands = pytest --color=yes {posargs}
11+
12+
[testenv:lint]
13+
description = Lint via pre-commit
14+
base_python = py39
15+
commands = pre-commit run --all-files
16+
17+
[testenv:mypy]
18+
description = Typecheck with mypy
19+
base_python = py39
20+
commands = mypy -p git
21+
ignore_outcome = true
22+
23+
[testenv:black]
24+
description = Check style with black
25+
base_python = py39
26+
commands = black --check --diff git
27+
28+
# Run "tox -e html" for this. It is deliberately excluded from env_list, as
29+
# unlike the other environments, this one writes outside the .tox/ directory.
30+
[testenv:html]
31+
description = Build HTML documentation
32+
base_python = py39
33+
deps = -r doc/requirements.txt
34+
allowlist_externals = make
35+
commands = make -C doc html

0 commit comments

Comments
 (0)