[tox] # NOTE(kgriffs): The py26, py27, and py34 envs are required when # checking combined coverage. To check coverage: # # $ tox -e py26,py27,py34 && tools/combine_coverage.sh # # You can then drill down into coverage details by opening the HTML # report at ".coverage_html/index.html". envlist = py26, py27, py34, py35, pep8, docs [testenv] deps = -r{toxinidir}/tools/test-requires commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon nosetests [] # -------------------------------------------------------------------- # Coverage # -------------------------------------------------------------------- [with-coverage] whitelist_externals = bash mv commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon nosetests --with-coverage [] bash -c "if [ ! -d .coverage_data ]; then mkdir .coverage_data; fi" mv {toxinidir}/.coverage {toxinidir}/.coverage_data/.coverage.{envname} [testenv:py26] whitelist_externals = {[with-coverage]whitelist_externals} commands = {[with-coverage]commands} [testenv:py27] whitelist_externals = {[with-coverage]whitelist_externals} commands = {[with-coverage]commands} [testenv:py34] whitelist_externals = {[with-coverage]whitelist_externals} commands = {[with-coverage]commands} # -------------------------------------------------------------------- # Debugging # -------------------------------------------------------------------- [with-debug-tools] deps = -r{toxinidir}/tools/test-requires ipdb pdbpp [testenv:py27_debug] deps = {[with-debug-tools]deps} [testenv:py34_debug] deps = {[with-debug-tools]deps} [testenv:py27_profile] deps = -r{toxinidir}/tools/test-requires nose-cprof commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon nosetests \ --with-cprofile \ --cprofile-stats-erase \ --cprofile-stats-file=cprofile.dat \ -s \ [] # -------------------------------------------------------------------- # Cython # -------------------------------------------------------------------- [with-cython] deps = -r{toxinidir}/tools/test-requires cython [testenv:py27_cython] deps = {[with-cython]deps} [testenv:py33_cython] deps = {[with-cython]deps} [testenv:py34_cython] deps = {[with-cython]deps} [testenv:py35_cython] deps = {[with-cython]deps} # -------------------------------------------------------------------- # Smoke testing # -------------------------------------------------------------------- [smoke-test] commands = falcon-bench -t 1 -b falcon-ext [testenv:py27_smoke] # This test smoke-tests a basic Falcon app deps = -r{toxinidir}/tools/bench-requires commands = {[smoke-test]commands} [testenv:py27_smoke_cython] # This test ensures that a falcon app will run fine under Cython deps = -r{toxinidir}/tools/bench-requires cython commands = {[smoke-test]commands} # -------------------------------------------------------------------- # Lint # -------------------------------------------------------------------- [testenv:py3kwarn] 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=./build,.venv,.tox,dist,doc,./falcon/bench/nuts \ --ignore=F403 \ --max-line-length=99 \ --import-order-style=google \ --application-import-names=falcon \ [] # -------------------------------------------------------------------- # Benchmarking # -------------------------------------------------------------------- [testenv:py26_bench] deps = -r{toxinidir}/tools/bench-requires commands = falcon-bench [] [testenv:py27_bench] deps = -r{toxinidir}/tools/bench-requires commands = falcon-bench [] [testenv:py27_bench_cython] deps = -r{toxinidir}/tools/bench-requires cython commands = falcon-bench [] [testenv:py33_bench] deps = -r{toxinidir}/tools/bench-requires commands = falcon-bench [] [testenv:py33_bench_cython] deps = -r{toxinidir}/tools/bench-requires cython commands = falcon-bench [] [testenv:py34_bench] deps = -r{toxinidir}/tools/bench-requires commands = falcon-bench [] [testenv:py34_bench_cython] deps = -r{toxinidir}/tools/bench-requires cython commands = falcon-bench [] [testenv:py35_bench] deps = -r{toxinidir}/tools/bench-requires commands = falcon-bench [] [testenv:py35_bench_cython] deps = -r{toxinidir}/tools/bench-requires cython commands = falcon-bench [] [testenv:pypy_bench] deps = -r{toxinidir}/tools/bench-requires commands = falcon-bench [] [testenv:pypy3_bench] deps = -r{toxinidir}/tools/bench-requires commands = falcon-bench [] # -------------------------------------------------------------------- # Documentation # -------------------------------------------------------------------- [testenv:docs] deps = -r{toxinidir}/tools/doc-requires whitelist_externals = rm basepython = python2.7 commands = rm -rf doc/_build sphinx-build -b html doc doc/_build/html