2016-10-15 10:56:34 +01:00
|
|
|
[tox]
|
2020-02-05 19:17:55 +00:00
|
|
|
envlist = py36, py37, py38, pyNightly, {py36,py37,py38,pyNightly}-no-ext, lint, check, security, docs
|
2016-12-26 03:05:11 +00:00
|
|
|
|
2017-02-05 19:44:01 +00:00
|
|
|
[testenv]
|
2017-05-15 02:49:25 +01:00
|
|
|
usedevelop = True
|
|
|
|
setenv =
|
2020-02-05 19:17:55 +00:00
|
|
|
{py36,py37,py38,pyNightly}-no-ext: SANIC_NO_UJSON=1
|
|
|
|
{py36,py37,py38,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
|
2016-10-15 10:56:34 +01:00
|
|
|
deps =
|
2017-05-15 02:49:25 +01:00
|
|
|
coverage
|
2019-10-07 19:41:44 +01:00
|
|
|
pytest==5.2.1
|
2017-06-11 16:49:35 +01:00
|
|
|
pytest-cov
|
2017-08-09 06:21:40 +01:00
|
|
|
pytest-sanic
|
2017-05-15 02:49:25 +01:00
|
|
|
pytest-sugar
|
2019-05-16 16:56:25 +01:00
|
|
|
httpcore==0.3.0
|
2019-12-21 03:23:52 +00:00
|
|
|
httpx==0.9.3
|
2017-05-15 02:49:25 +01:00
|
|
|
chardet<=2.3.0
|
|
|
|
beautifulsoup4
|
2017-05-23 03:59:55 +01:00
|
|
|
gunicorn
|
2019-02-28 14:56:41 +00:00
|
|
|
pytest-benchmark
|
2019-06-18 22:15:41 +01:00
|
|
|
uvicorn
|
2019-07-19 03:57:17 +01:00
|
|
|
websockets>=7.0,<8.0
|
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
|
2017-08-10 15:55:38 +01:00
|
|
|
coverage report -m
|
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
|
|
|
deps =
|
|
|
|
flake8
|
2018-10-14 02:10:43 +01:00
|
|
|
black
|
2018-10-18 05:20:16 +01:00
|
|
|
isort
|
2019-06-23 22:20:00 +01:00
|
|
|
bandit
|
2016-12-24 22:06:53 +00:00
|
|
|
|
|
|
|
commands =
|
|
|
|
flake8 sanic
|
2019-06-23 22:20:00 +01:00
|
|
|
black --config ./.black.toml --check --verbose sanic/
|
2018-10-18 05:20:16 +01:00
|
|
|
isort --check-only --recursive sanic
|
2017-05-02 10:17:24 +01:00
|
|
|
|
2019-09-22 21:55:36 +01: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 14:56:41 +00:00
|
|
|
|
|
|
|
[pytest]
|
|
|
|
filterwarnings =
|
|
|
|
ignore:.*async with lock.* instead:DeprecationWarning
|
2019-06-23 22:20:00 +01:00
|
|
|
|
|
|
|
[testenv:security]
|
|
|
|
deps =
|
|
|
|
bandit
|
|
|
|
|
|
|
|
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
|
2019-07-13 08:50:13 +01:00
|
|
|
whitelist_externals = make
|
2019-07-13 08:30:37 +01:00
|
|
|
deps =
|
|
|
|
sphinx>=2.1.2
|
|
|
|
sphinx_rtd_theme>=0.4.3
|
|
|
|
recommonmark>=0.5.0
|
|
|
|
docutils
|
|
|
|
pygments
|
2019-07-13 08:50:13 +01:00
|
|
|
gunicorn
|
2019-07-13 08:30:37 +01:00
|
|
|
|
|
|
|
commands =
|
|
|
|
make docs-test
|