2016-05-29 17:11:31 +00:00
|
|
|
[tox]
|
2016-06-07 07:17:15 +00:00
|
|
|
envlist = py27, py35, docs, lint
|
2016-05-29 17:11:31 +00:00
|
|
|
|
|
|
|
[testenv]
|
2016-06-07 07:17:15 +00:00
|
|
|
deps =
|
|
|
|
-rrequirements.txt
|
|
|
|
codecov>=2.0.5
|
|
|
|
passenv = CI TRAVIS_BUILD_ID TRAVIS TRAVIS_BRANCH TRAVIS_JOB_NUMBER TRAVIS_PULL_REQUEST TRAVIS_JOB_ID TRAVIS_REPO_SLUG TRAVIS_COMMIT
|
2016-06-10 21:34:40 +00:00
|
|
|
setenv =
|
2016-06-11 09:18:47 +00:00
|
|
|
PY3TESTS = test/netlib test/mitmproxy/script test/pathod/test_utils.py test/pathod/test_log.py test/pathod/test_language_generators.py test/pathod/test_language_writer.py test/pathod/test_language_base.py test/pathod/test_language_http.py test/pathod/test_language_websocket.py test/pathod/test_language_http2.py test/pathod/test_pathoc.py
|
2016-05-30 22:25:24 +00:00
|
|
|
|
|
|
|
[testenv:py27]
|
2016-06-10 04:03:54 +00:00
|
|
|
commands =
|
|
|
|
py.test -n 8 --color=yes --timeout 60 []
|
|
|
|
|
|
|
|
[testenv:py35]
|
|
|
|
# remove bash & pipe & grep hack after cryptography ships with openssl 1.1.0
|
|
|
|
whitelist_externals = bash
|
|
|
|
commands =
|
2016-06-10 21:34:40 +00:00
|
|
|
bash -c 'set -o pipefail ; py.test -n 8 --color=yes --timeout 60 {env:PY3TESTS:} 2>&1 | grep -v Cryptography_locking_cb'
|
2016-06-10 04:03:54 +00:00
|
|
|
|
|
|
|
[testenv:py27-ci]
|
2016-06-07 07:17:15 +00:00
|
|
|
commands =
|
|
|
|
py.test --cov netlib --cov mitmproxy --cov pathod --color=yes --timeout 60 ./test
|
|
|
|
codecov -e TOXENV
|
2016-05-30 22:25:24 +00:00
|
|
|
|
2016-06-10 04:03:54 +00:00
|
|
|
[testenv:py35-ci]
|
2016-06-07 07:17:15 +00:00
|
|
|
# remove bash & pipe & grep hack after cryptography ships with openssl 1.1.0
|
|
|
|
whitelist_externals = bash
|
|
|
|
commands =
|
2016-06-10 21:34:40 +00:00
|
|
|
bash -c 'set -o pipefail ; py.test --cov netlib --cov mitmproxy --cov pathod --color=yes --timeout 60 {env:PY3TESTS:} 2>&1 | grep -v Cryptography_locking_cb'
|
2016-06-07 07:17:15 +00:00
|
|
|
codecov -e TOXENV
|
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
basepython = python2.7
|
|
|
|
whitelist_externals = make
|
|
|
|
changedir = docs
|
|
|
|
setenv = SPHINXOPTS="-W"
|
|
|
|
commands = make -e html
|
2016-05-29 17:11:31 +00:00
|
|
|
|
|
|
|
[testenv:lint]
|
2016-06-07 07:17:15 +00:00
|
|
|
deps = flake8>=2.5.4, <3
|
|
|
|
commands = flake8 --jobs 8 --count mitmproxy netlib pathod examples test
|