sanic/tox.ini

56 lines
1.2 KiB
INI
Raw Normal View History

[tox]
envlist = py37, py38, py39, py310, pyNightly, pypy37, {py37,py38,py39,py310,pyNightly,pypy37}-no-ext, lint, check, security, docs, type-checking
2016-12-26 03:05:11 +00:00
[testenv]
usedevelop = true
2017-05-15 02:49:25 +01:00
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
2022-01-16 07:03:04 +00:00
allowlist_externals =
pytest
coverage
commands =
pytest {posargs:tests --cov sanic}
- coverage combine --append
coverage report -m -i
coverage html -i
2018-10-14 02:10:43 +01:00
[testenv:lint]
commands =
flake8 sanic
black --check --verbose sanic/
isort --check-only sanic
slotscheck --verbose -m sanic
2017-05-02 10:17:24 +01:00
[testenv:type-checking]
commands =
mypy sanic
2017-05-02 10:17:24 +01:00
[testenv:check]
commands =
python setup.py check -r -s
[pytest]
filterwarnings =
ignore:.*async with lock.* instead:DeprecationWarning
2020-09-08 12:08:49 +01:00
addopts = --strict-markers
2020-09-27 08:46:51 +01:00
markers =
asyncio
[testenv:security]
commands =
bandit --recursive sanic --skip B404,B101 --exclude sanic/reloader_helpers.py
[testenv:docs]
platform = linux|linux2|darwin
2022-01-16 07:03:04 +00:00
allowlist_externals = make
extras = docs
commands =
make docs-test
[testenv:coverage]
commands =
pytest tests --cov=./sanic --cov-report=xml