-
Notifications
You must be signed in to change notification settings - Fork 147
/
tox.ini
39 lines (28 loc) · 1015 Bytes
/
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
[tox]
envlist = py, check_codestyle, check_types
[testenv]
# 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
extras =
dev
allowlist_externals = poetry
commands =
poetry run coverage run --source=sygnal -m twisted.trial tests
poetry run coverage report --sort=cover
poetry run coverage html
[testenv:check_codestyle]
allowlist_externals = poetry
commands =
poetry run ruff sygnal/ tests/ stubs
poetry run black --check --diff sygnal/ tests/ stubs
poetry run isort --check-only --diff sygnal/ tests/ stubs
[testenv:check_types]
allowlist_externals = poetry
commands =
poetry run mypy sygnal/ tests/ stubs