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