This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 189
/
tox.ini
73 lines (58 loc) · 1.98 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Tox (http://tox.testrun.org/) is a tool for running tests in
# multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip
# install tox" and then run "tox" from this directory.
[tox]
envlist = py{36,37,38,39,310,311}-{tests,install},docs,install,py36-docs
[testenv]
download = true
# Make sure reading the UTF-8 from test.py works regardless of the locale used.
# Note, that "en_US" is used here instead of "C" as "C" is not available on mac.
setenv =
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
# To pass arguments to pytest, use `tox [options] -- [pytest posargs]`.
commands =
pytest src/tests {posargs}
mypy src/
black --check src/pydocstyle
isort --check src/pydocstyle
deps =
-rrequirements/runtime.txt
-rrequirements/tests.txt
[testenv:install]
skip_install = True
commands =
pip wheel . -w dist --no-deps
pip install --no-index --find-links=dist pydocstyle
pydocstyle --help
[testenv:docs]
changedir = docs
deps =
-rrequirements/runtime.txt
-rrequirements/docs.txt
commands = sphinx-build -b html . _build
[testenv:py36-docs]
changedir = {[testenv:docs]changedir}
deps = {[testenv:docs]deps}
commands = {[testenv:docs]commands}
# There's no way to generate sub-sections in tox.
# The following sections are all references to the `py37-install`.
[testenv:py36-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py37-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py38-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py39-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py310-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}
[testenv:py311-install]
skip_install = {[testenv:install]skip_install}
commands = {[testenv:install]commands}