4726cf1910
Co-authored-by: Néstor Pérez <25409753+prryplatypus@users.noreply.github.com>
60 lines
1.3 KiB
INI
60 lines
1.3 KiB
INI
[tox]
|
|
envlist = py37, py38, py39, py310, pyNightly, pypy37, {py37,py38,py39,py310,pyNightly,pypy37}-no-ext, lint, check, security, docs, type-checking
|
|
|
|
[testenv]
|
|
usedevelop = true
|
|
setenv =
|
|
{py37,py38,py39,py310,pyNightly}-no-ext: SANIC_NO_UJSON=1
|
|
{py37,py38,py39,py310,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
|
|
extras = test, http3
|
|
deps =
|
|
httpx==0.23
|
|
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 =
|
|
flake8 sanic
|
|
black --check --verbose sanic/
|
|
isort --check-only sanic
|
|
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
|
|
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
|