forked from sanic-org/sanic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
60 lines (51 loc) · 1.33 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
[tox]
envlist = py38, py39, py310, py311, py312, pyNightly, pypy310, {py38,py39,py310,py311,py312,pyNightly,pypy310}-no-ext, lint, check, security, docs, type-checking
[testenv]
usedevelop = true
setenv =
{py38,py39,py310,py311,py312,pyNightly}-no-ext: SANIC_NO_UJSON=1
{py38,py39,py310,py311,py312,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
extras = test, http3
deps =
httpx>=0.23
setuptools
allowlist_externals =
pytest
coverage
commands =
coverage run --source ./sanic -m pytest {posargs:tests}
- coverage combine --append
coverage report -m -i
coverage html -i
[testenv:lint]
commands =
ruff check sanic
ruff format sanic --check
slotscheck --verbose -m sanic
[testenv:type-checking]
commands =
mypy sanic
[testenv:check]
commands =
python setup.py check -r -s
[pytest]
filterwarnings =
ignore:.*async with lock.* instead:DeprecationWarning
ignore::pytest.PytestUnhandledThreadExceptionWarning
addopts = --strict-markers
markers =
asyncio
[testenv:security]
commands =
bandit --recursive sanic --skip B404,B101
[testenv:docs]
platform = linux|linux2|darwin
allowlist_externals = make
extras = docs, http3
commands =
make docs-test
[testenv:coverage]
commands =
coverage run --source ./sanic -m pytest {posargs:tests}
- coverage combine --append
coverage xml -i