2016-10-15 10:56:34 +01:00
|
|
|
[tox]
|
2021-10-28 19:41:57 +01:00
|
|
|
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
|
|
|
|
2017-02-05 19:44:01 +00:00
|
|
|
[testenv]
|
2021-07-08 07:12:56 +01:00
|
|
|
usedevelop = true
|
2017-05-15 02:49:25 +01:00
|
|
|
setenv =
|
2021-10-28 19:41:57 +01:00
|
|
|
{py37,py38,py39,py310,pyNightly}-no-ext: SANIC_NO_UJSON=1
|
|
|
|
{py37,py38,py39,py310,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
|
2021-07-08 07:12:56 +01:00
|
|
|
extras = test
|
2022-01-16 07:03:04 +00:00
|
|
|
allowlist_externals =
|
|
|
|
pytest
|
|
|
|
coverage
|
2016-10-15 10:56:34 +01:00
|
|
|
commands =
|
2019-04-23 22:44:42 +01:00
|
|
|
pytest {posargs:tests --cov sanic}
|
2017-08-10 16:39:02 +01:00
|
|
|
- coverage combine --append
|
2021-08-05 20:55:42 +01:00
|
|
|
coverage report -m -i
|
2018-11-25 19:56:34 +00:00
|
|
|
coverage html -i
|
2017-02-05 19:44:01 +00:00
|
|
|
|
2018-10-14 02:10:43 +01:00
|
|
|
[testenv:lint]
|
2016-12-24 22:06:53 +00:00
|
|
|
commands =
|
|
|
|
flake8 sanic
|
2022-05-26 10:48:32 +01:00
|
|
|
black --check --verbose sanic/
|
|
|
|
isort --check-only sanic
|
2022-02-24 15:45:23 +00:00
|
|
|
slotscheck --verbose -m sanic
|
2017-05-02 10:17:24 +01:00
|
|
|
|
2019-09-22 21:55:36 +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
|
2019-02-28 14:56:41 +00:00
|
|
|
|
|
|
|
[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
|
2019-06-23 22:20:00 +01:00
|
|
|
|
|
|
|
[testenv:security]
|
|
|
|
|
|
|
|
commands =
|
2019-06-24 20:49:11 +01:00
|
|
|
bandit --recursive sanic --skip B404,B101 --exclude sanic/reloader_helpers.py
|
2019-07-13 08:30:37 +01:00
|
|
|
|
|
|
|
[testenv:docs]
|
2019-07-13 08:59:17 +01:00
|
|
|
platform = linux|linux2|darwin
|
2022-01-16 07:03:04 +00:00
|
|
|
allowlist_externals = make
|
2021-07-08 07:12:56 +01:00
|
|
|
extras = docs
|
2019-07-13 08:30:37 +01:00
|
|
|
commands =
|
|
|
|
make docs-test
|
2021-06-21 12:53:09 +01:00
|
|
|
|
|
|
|
[testenv:coverage]
|
|
|
|
commands =
|
|
|
|
pytest tests --cov=./sanic --cov-report=xml
|