2016-10-15 10:56:34 +01:00
|
|
|
[tox]
|
2023-07-09 20:00:14 +01:00
|
|
|
envlist = py38, py39, py310, py311, pyNightly, pypy310, {py38,py39,py310,py311,pyNightly,pypy310}-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 =
|
2023-07-09 20:00:14 +01:00
|
|
|
{py38,py39,py310,py311,pyNightly}-no-ext: SANIC_NO_UJSON=1
|
|
|
|
{py38,py39,py310,py311,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
|
2022-06-27 09:19:26 +01:00
|
|
|
extras = test, http3
|
|
|
|
deps =
|
2023-07-09 20:00:14 +01:00
|
|
|
httpx>=0.23
|
2022-01-16 07:03:04 +00:00
|
|
|
allowlist_externals =
|
|
|
|
pytest
|
|
|
|
coverage
|
2016-10-15 10:56:34 +01:00
|
|
|
commands =
|
2022-09-18 15:17:23 +01:00
|
|
|
coverage run --source ./sanic -m pytest {posargs:tests}
|
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 =
|
2023-10-25 04:12:24 +01:00
|
|
|
ruff sanic
|
|
|
|
ruff format sanic --check
|
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 =
|
2022-09-18 15:17:23 +01:00
|
|
|
bandit --recursive sanic --skip B404,B101
|
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
|
2022-06-27 09:19:26 +01:00
|
|
|
extras = docs, http3
|
2019-07-13 08:30:37 +01:00
|
|
|
commands =
|
|
|
|
make docs-test
|
2021-06-21 12:53:09 +01:00
|
|
|
|
|
|
|
[testenv:coverage]
|
|
|
|
commands =
|
2022-09-18 15:17:23 +01:00
|
|
|
coverage run --source ./sanic -m pytest {posargs:tests}
|
|
|
|
- coverage combine --append
|
|
|
|
coverage xml -i
|