2016-10-15 11:56:34 +02:00
|
|
|
[tox]
|
2020-10-25 15:21:48 +02:00
|
|
|
envlist = py36, py37, py38, py39, pyNightly, {py36,py37,py38,py39,pyNightly}-no-ext, lint, check, security, docs
|
2016-12-25 19:05:11 -08:00
|
|
|
|
2017-02-05 11:44:01 -08:00
|
|
|
[testenv]
|
2017-05-15 09:49:25 +08:00
|
|
|
usedevelop = True
|
|
|
|
setenv =
|
2020-10-25 15:21:48 +02:00
|
|
|
{py36,py37,py38,py39,pyNightly}-no-ext: SANIC_NO_UJSON=1
|
|
|
|
{py36,py37,py38,py39,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
|
2016-10-15 11:56:34 +02:00
|
|
|
deps =
|
2021-01-28 09:22:22 +02:00
|
|
|
sanic-testing==0.1.2
|
2020-12-24 21:56:35 +02:00
|
|
|
coverage==5.3
|
2019-10-07 11:41:44 -07:00
|
|
|
pytest==5.2.1
|
2017-06-11 08:49:35 -07:00
|
|
|
pytest-cov
|
2017-08-08 22:21:40 -07:00
|
|
|
pytest-sanic
|
2017-05-15 09:49:25 +08:00
|
|
|
pytest-sugar
|
2020-09-30 15:44:09 +02:00
|
|
|
pytest-benchmark
|
2020-12-24 21:56:35 +02:00
|
|
|
chardet==3.*
|
2017-05-15 09:49:25 +08:00
|
|
|
beautifulsoup4
|
2020-12-24 21:56:35 +02:00
|
|
|
gunicorn==20.0.4
|
2019-06-19 00:15:41 +03:00
|
|
|
uvicorn
|
2020-06-28 08:43:12 +03:00
|
|
|
websockets>=8.1,<9.0
|
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
|
2017-08-10 07:55:38 -07:00
|
|
|
coverage report -m
|
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
|
|
|
deps =
|
|
|
|
flake8
|
2018-10-13 18:10:43 -07:00
|
|
|
black
|
2020-07-07 15:43:33 +10:00
|
|
|
isort>=5.0.0
|
2019-06-23 23:20:00 +02:00
|
|
|
bandit
|
2016-12-24 14:06:53 -08:00
|
|
|
|
|
|
|
commands =
|
|
|
|
flake8 sanic
|
2019-06-23 23:20:00 +02:00
|
|
|
black --config ./.black.toml --check --verbose sanic/
|
2020-07-07 15:43:33 +10:00
|
|
|
isort --check-only sanic
|
2017-05-02 10:17:24 +01:00
|
|
|
|
2019-09-22 17:55:36 -03:00
|
|
|
[testenv:type-checking]
|
|
|
|
deps =
|
|
|
|
mypy
|
|
|
|
|
|
|
|
commands =
|
|
|
|
mypy sanic
|
|
|
|
|
2017-05-02 10:17:24 +01:00
|
|
|
[testenv:check]
|
|
|
|
deps =
|
|
|
|
docutils
|
|
|
|
pygments
|
|
|
|
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]
|
|
|
|
deps =
|
|
|
|
bandit
|
|
|
|
|
|
|
|
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
|
2019-07-13 13:20:13 +05:30
|
|
|
whitelist_externals = make
|
2019-07-13 13:00:37 +05:30
|
|
|
deps =
|
|
|
|
sphinx>=2.1.2
|
|
|
|
sphinx_rtd_theme>=0.4.3
|
|
|
|
recommonmark>=0.5.0
|
|
|
|
docutils
|
|
|
|
pygments
|
2020-12-24 21:56:35 +02:00
|
|
|
gunicorn==20.0.4
|
2019-07-13 13:00:37 +05:30
|
|
|
|
|
|
|
commands =
|
|
|
|
make docs-test
|