-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
43 lines (34 loc) · 1.05 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
[tox]
envlist = py, check_codestyle, check_types
# required for PEP 517 (pyproject.toml-style) builds
isolated_build = true
[testenv]
allowlist_externals = poetry
commands = poetry install
[testenv:py]
# As of twisted 16.4, trial tries to import the tests as a package (previously
# it loaded the files explicitly), which means they need to be on the
# pythonpath. Our sdist doesn't include the 'tests' package, so normally it
# doesn't work within the tox virtualenv.
#
# As a workaround, we tell tox to do install with 'pip -e', which just
# creates a symlink to the project directory instead of unpacking the sdist.
usedevelop=true
commands = poetry run python -m unittest discover tests
[testenv:check_codestyle]
deps =
flake8
black
isort
commands =
poetry run flake8 perf src tests
poetry run black --check --diff perf src tests
poetry run isort --check-only --diff perf src tests
[testenv:check_types]
deps =
mypy
types-jsonschema
types-PyYAML
types-cachetools
types-humanfriendly
commands = poetry run mypy perf src tests