sanic/tox.ini
L. Kärkkäinen 48800e657f
Deprecation and test cleanup (#1818)
* Remove remove_route, deprecated in 19.6.

* No need for py35 compat anymore.

* Rewrite asyncio.coroutines with async/await.

* Remove deprecated request.raw_args.

* response.text() takes str only: avoid deprecation warning in all but one test.

* Remove unused import.

* Revert unnecessary deprecation warning.

* Remove apparently unnecessary py38 compat.

* Avoid asyncio.Task.all_tasks deprecation warning.

* Avoid warning on a test that tests deprecated response.text(int).

* Add pytest-asyncio to tox deps.

* Run the coroutine returned by AsyncioServer.close.

Co-authored-by: L. Kärkkäinen <tronic@users.noreply.github.com>
2020-03-28 11:43:14 -07:00

80 lines
1.4 KiB
INI

[tox]
envlist = py36, py37, py38, pyNightly, {py36,py37,py38,pyNightly}-no-ext, lint, check, security, docs
[testenv]
usedevelop = True
setenv =
{py36,py37,py38,pyNightly}-no-ext: SANIC_NO_UJSON=1
{py36,py37,py38,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
deps =
coverage
pytest==5.2.1
pytest-asyncio
pytest-cov
pytest-sanic
pytest-sugar
httpcore==0.3.0
httpx==0.11.1
chardet<=2.3.0
beautifulsoup4
gunicorn
pytest-benchmark
uvicorn
websockets>=7.0,<8.0
commands =
pytest {posargs:tests --cov sanic}
- coverage combine --append
coverage report -m
coverage html -i
[testenv:lint]
deps =
flake8
black
isort
bandit
commands =
flake8 sanic
black --config ./.black.toml --check --verbose sanic/
isort --check-only --recursive sanic
[testenv:type-checking]
deps =
mypy
commands =
mypy sanic
[testenv:check]
deps =
docutils
pygments
commands =
python setup.py check -r -s
[pytest]
filterwarnings =
ignore:.*async with lock.* instead:DeprecationWarning
[testenv:security]
deps =
bandit
commands =
bandit --recursive sanic --skip B404,B101 --exclude sanic/reloader_helpers.py
[testenv:docs]
platform = linux|linux2|darwin
whitelist_externals = make
deps =
sphinx>=2.1.2
sphinx_rtd_theme>=0.4.3
recommonmark>=0.5.0
docutils
pygments
gunicorn
commands =
make docs-test