317 lines
8.0 KiB
INI
317 lines
8.0 KiB
INI
[tox]
|
|
# NOTE(kgriffs): The py26, py27, and py36 envs are required when
|
|
# checking combined coverage. To check coverage:
|
|
#
|
|
# $ tox -e py26,py27,py36 && tools/testing/combine_coverage.sh
|
|
#
|
|
# You can then drill down into coverage details by opening the HTML
|
|
# report at ".coverage_html/index.html".
|
|
|
|
envlist = py26,
|
|
py27,
|
|
py36,
|
|
pep8,
|
|
docs
|
|
|
|
[testenv]
|
|
deps = -r{toxinidir}/requirements/tests
|
|
commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon
|
|
pytest tests []
|
|
|
|
# --------------------------------------------------------------------
|
|
# Coverage
|
|
# --------------------------------------------------------------------
|
|
|
|
[with-coverage]
|
|
whitelist_externals = mkdir
|
|
mv
|
|
commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon
|
|
pytest --cov=falcon tests []
|
|
mkdir -p .coverage_data
|
|
mv {toxinidir}/.coverage {toxinidir}/.coverage_data/.coverage.{envname}
|
|
|
|
[testenv:py26]
|
|
# NOTE(kgriffs): pytest-randomly is not compatible with py26
|
|
whitelist_externals = {[with-coverage]whitelist_externals}
|
|
commands = {[with-coverage]commands}
|
|
|
|
[testenv:py27]
|
|
deps = {[testenv]deps}
|
|
pytest-randomly
|
|
whitelist_externals = {[with-coverage]whitelist_externals}
|
|
commands = {[with-coverage]commands}
|
|
|
|
[testenv:py36]
|
|
deps = {[testenv]deps}
|
|
pytest-randomly
|
|
whitelist_externals = {[with-coverage]whitelist_externals}
|
|
commands = {[with-coverage]commands}
|
|
|
|
# --------------------------------------------------------------------
|
|
# Debugging
|
|
# --------------------------------------------------------------------
|
|
|
|
[with-debug-tools]
|
|
deps = -r{toxinidir}/requirements/tests
|
|
pdbpp
|
|
|
|
[testenv:py2_debug]
|
|
basepython = python2.7
|
|
deps = {[with-debug-tools]deps}
|
|
funcsigs
|
|
|
|
[testenv:py3_debug]
|
|
basepython = python3.6
|
|
deps = {[with-debug-tools]deps}
|
|
|
|
# --------------------------------------------------------------------
|
|
# ujson
|
|
# --------------------------------------------------------------------
|
|
|
|
[with-ujson]
|
|
deps = -r{toxinidir}/requirements/tests
|
|
ujson
|
|
|
|
[testenv:py27_ujson]
|
|
basepython = python2.7
|
|
deps = {[with-ujson]deps}
|
|
|
|
[testenv:py35_ujson]
|
|
basepython = python3.5
|
|
deps = {[with-ujson]deps}
|
|
|
|
[testenv:py36_ujson]
|
|
basepython = python3.6
|
|
deps = {[with-ujson]deps}
|
|
|
|
# --------------------------------------------------------------------
|
|
# Cython
|
|
# --------------------------------------------------------------------
|
|
|
|
[with-cython]
|
|
deps = -r{toxinidir}/requirements/tests
|
|
cython
|
|
|
|
[testenv:py27_cython]
|
|
basepython = python2.7
|
|
deps = {[with-cython]deps}
|
|
|
|
[testenv:py33_cython]
|
|
basepython = python3.3
|
|
deps = {[with-cython]deps}
|
|
|
|
[testenv:py34_cython]
|
|
basepython = python3.4
|
|
deps = {[with-cython]deps}
|
|
|
|
[testenv:py35_cython]
|
|
basepython = python3.5
|
|
deps = {[with-cython]deps}
|
|
|
|
[testenv:py36_cython]
|
|
basepython = python3.6
|
|
deps = {[with-cython]deps}
|
|
|
|
# --------------------------------------------------------------------
|
|
# Smoke testing with a sample app
|
|
# --------------------------------------------------------------------
|
|
|
|
[smoke-test]
|
|
commands = falcon-bench -t 1 -b falcon-ext
|
|
|
|
[testenv:py27_smoke]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = {[smoke-test]commands}
|
|
|
|
[testenv:py27_smoke_cython]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/requirements/bench
|
|
cython
|
|
commands = {[smoke-test]commands}
|
|
|
|
[testenv:py36_smoke]
|
|
basepython = python3.6
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = {[smoke-test]commands}
|
|
|
|
[testenv:py36_smoke_cython]
|
|
basepython = python3.6
|
|
deps = -r{toxinidir}/requirements/bench
|
|
cython
|
|
commands = {[smoke-test]commands}
|
|
|
|
# --------------------------------------------------------------------
|
|
# Lint
|
|
# --------------------------------------------------------------------
|
|
|
|
[testenv:py3kwarn]
|
|
basepython = python2.7
|
|
deps = py3kwarn
|
|
commands = py3kwarn falcon
|
|
|
|
[testenv:pep8]
|
|
deps = flake8
|
|
flake8-quotes
|
|
flake8-import-order
|
|
|
|
# NOTE(kgriffs): Run with py27 since some code branches assume the
|
|
# unicode type is defined, and pep8 complains in those cases when
|
|
# running under py3.
|
|
basepython = python2.7
|
|
|
|
commands = flake8 \
|
|
--max-complexity=15 \
|
|
--exclude=.ecosystem,.eggs,.tox,.venv,build,dist,docs,examples,falcon/bench/nuts \
|
|
--ignore=F403 \
|
|
--max-line-length=99 \
|
|
--import-order-style=google \
|
|
--application-import-names=falcon \
|
|
[]
|
|
|
|
[testenv:pep8-examples]
|
|
deps = flake8
|
|
flake8-quotes
|
|
flake8-import-order
|
|
|
|
# NOTE(kgriffs): Run with py27 since some code branches assume the
|
|
# unicode type is defined, and pep8 complains in those cases when
|
|
# running under py3.
|
|
basepython = python2.7
|
|
|
|
commands = flake8 examples \
|
|
--max-complexity=12 \
|
|
--ignore=F403 \
|
|
--max-line-length=99 \
|
|
--import-order-style=google \
|
|
--application-import-names=look \
|
|
[]
|
|
|
|
# --------------------------------------------------------------------
|
|
# For viewing environ dicts generated by various WSGI servers
|
|
# --------------------------------------------------------------------
|
|
|
|
[testenv:py27_dump_uwsgi]
|
|
basepython = python2.7
|
|
deps = uwsgi
|
|
commands = uwsgi --http localhost:8000 --wsgi-file {toxinidir}/tests/dump_wsgi.py
|
|
|
|
[testenv:py27_dump_gunicorn]
|
|
basepython = python2.7
|
|
deps = gunicorn
|
|
commands = gunicorn -b localhost:8000 tests.dump_wsgi
|
|
|
|
[testenv:py36_dump_gunicorn]
|
|
basepython = python3.6
|
|
deps = gunicorn
|
|
commands = gunicorn -b localhost:8000 tests.dump_wsgi
|
|
|
|
[testenv:py27_dump_waitress]
|
|
basepython = python2.7
|
|
deps = waitress
|
|
commands = waitress-serve --listen=localhost:8000 tests.dump_wsgi:application
|
|
|
|
[testenv:py27_dump_wsgiref]
|
|
basepython = python2.7
|
|
commands = python tests/dump_wsgi.py
|
|
|
|
[testenv:py36_dump_wsgiref]
|
|
basepython = python3.6
|
|
commands = python tests/dump_wsgi.py
|
|
|
|
# --------------------------------------------------------------------
|
|
# Benchmarking
|
|
# --------------------------------------------------------------------
|
|
|
|
[testenv:py26_bench]
|
|
basepython = python2.6
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py27_bench]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py27_bench_cython]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/requirements/bench
|
|
cython
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py33_bench]
|
|
basepython = python3.3
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py33_bench_cython]
|
|
basepython = python3.3
|
|
deps = -r{toxinidir}/requirements/bench
|
|
cython
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py34_bench]
|
|
basepython = python3.4
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py34_bench_cython]
|
|
basepython = python3.4
|
|
deps = -r{toxinidir}/requirements/bench
|
|
cython
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py35_bench]
|
|
basepython = python3.5
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py35_bench_cython]
|
|
basepython = python3.5
|
|
deps = -r{toxinidir}/requirements/bench
|
|
cython
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py36_bench]
|
|
basepython = python3.6
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = falcon-bench []
|
|
|
|
[testenv:py36_bench_cython]
|
|
basepython = python3.6
|
|
deps = -r{toxinidir}/requirements/bench
|
|
cython
|
|
commands = falcon-bench []
|
|
|
|
[testenv:pypy_bench]
|
|
basepython = pypy
|
|
deps = -r{toxinidir}/requirements/bench
|
|
commands = falcon-bench []
|
|
|
|
# TODO(kgriffs): Uncomment when pypy3 is more mature
|
|
; [testenv:pypy3_bench]
|
|
; basepython = pypy3
|
|
; deps = -r{toxinidir}/requirements/bench
|
|
; commands = falcon-bench []
|
|
|
|
# --------------------------------------------------------------------
|
|
# Documentation
|
|
# --------------------------------------------------------------------
|
|
|
|
[testenv:docs]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/requirements/docs
|
|
commands =
|
|
sphinx-build -W -E -b html docs docs/_build/html []
|
|
|
|
# --------------------------------------------------------------------
|
|
# Ecosystem
|
|
# --------------------------------------------------------------------
|
|
|
|
[testenv:hug]
|
|
basepython = python3.6
|
|
deps = virtualenv
|
|
commands =
|
|
{toxinidir}/tools/testing/install_hug.sh
|
|
{toxinidir}/tools/testing/test_hug.sh
|