f5bd6e3b2f
Administratively merging because @vltr and @ahopkins are the release managers, and @ahopkins is originator of the PR * Add Python 3.10 testing (and support) * fixed py310 tox environment for windows, quoted '3.10' in python-310 tests to avoid numeric compression * updated tox.ini for py310 * quoted the rest of the bare 3.10 references in the workflows * Issue with pytest requires version bump to 6.2.5 for python 3.10 Co-authored-by: Stephen Sadowski <stephen.sadowski@sjsadowski.com>
52 lines
1.1 KiB
INI
52 lines
1.1 KiB
INI
[tox]
|
|
envlist = py37, py38, py39, py310, pyNightly, pypy37, {py37,py38,py39,py310,pyNightly,pypy37}-no-ext, lint, check, security, docs, type-checking
|
|
|
|
[testenv]
|
|
usedevelop = true
|
|
setenv =
|
|
{py37,py38,py39,py310,pyNightly}-no-ext: SANIC_NO_UJSON=1
|
|
{py37,py38,py39,py310,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
|
|
extras = test
|
|
commands =
|
|
pytest {posargs:tests --cov sanic}
|
|
- coverage combine --append
|
|
coverage report -m -i
|
|
coverage html -i
|
|
|
|
[testenv:lint]
|
|
commands =
|
|
flake8 sanic
|
|
black --config ./.black.toml --check --verbose sanic/
|
|
isort --check-only sanic --profile=black
|
|
|
|
[testenv:type-checking]
|
|
commands =
|
|
mypy sanic
|
|
|
|
[testenv:check]
|
|
commands =
|
|
python setup.py check -r -s
|
|
|
|
[pytest]
|
|
filterwarnings =
|
|
ignore:.*async with lock.* instead:DeprecationWarning
|
|
addopts = --strict-markers
|
|
markers =
|
|
asyncio
|
|
|
|
[testenv:security]
|
|
|
|
commands =
|
|
bandit --recursive sanic --skip B404,B101 --exclude sanic/reloader_helpers.py
|
|
|
|
[testenv:docs]
|
|
platform = linux|linux2|darwin
|
|
whitelist_externals = make
|
|
extras = docs
|
|
commands =
|
|
make docs-test
|
|
|
|
[testenv:coverage]
|
|
commands =
|
|
pytest tests --cov=./sanic --cov-report=xml
|