1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
[tox]
skip_missing_interpreters = True
minversion = 1.8
envlist =
py{py,27,37}-requests,style,isort-check,integration-tests
[testenv]
commands =
py.test --ignore="tests/test_integration.py" {posargs:-vvs}
# Ensure pex's main entrypoint can be run externally.
pex --cache-dir {envtmpdir}/buildcache wheel requests . -e pex.bin.pex:main --version
deps =
pytest==3.7.2
twitter.common.contextutil>=0.3.1,<0.4.0
twitter.common.dirutil>=0.3.1,<0.4.0
twitter.common.lang>=0.3.1,<0.4.0
twitter.common.testing>=0.3.1,<0.4.0
wheel==0.31.1
packaging==16.8
setuptools<34.0
list-tests: mock==2.0.0
py27: mock==2.0.0
pypy: mock==2.0.0
run: requests
requests: requests
requests: responses
cachecontrol: CacheControl
cachecontrol: lockfile
coverage: coverage==4.5.1
subprocess: subprocess32
whitelist_externals = open
[testenv:integration-tests]
deps =
tox
commands =
tox -e py27-integration -- {posargs:-vvs}
tox -e py37-integration -- {posargs:-vvs}
tox -e pypy-integration -- {posargs:-vvs}
[testenv:py27-integration]
commands =
py.test tests/test_integration.py {posargs:-vvs}
[testenv:py37-integration]
commands =
py.test tests/test_integration.py {posargs:-vvs}
[testenv:pypy-integration]
commands =
py.test tests/test_integration.py {posargs:-vvs}
[integration]
commands =
# This is necessary due to https://bitbucket.org/hpk42/tox/issue/175/cant-do-substitution-base-commands
bash scripts/coverage.sh
[testenv:list-tests]
commands = python scripts/list_tests.py
[testenv:py27-coverage]
commands = {[integration]commands}
[testenv:py27-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py34-coverage]
commands = {[integration]commands}
[testenv:py34-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py35-coverage]
commands = {[integration]commands}
[testenv:py35-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py36-coverage]
commands = {[integration]commands}
[testenv:py36-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py37-coverage]
commands = {[integration]commands}
[testenv:py37-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:pypy-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py27-coverage-simple]
basepython = python2.7
commands =
coverage erase
coverage run -p -m py.test {posargs:}
coverage combine
coverage report
coverage html
open htmlcov/index.html
[testenv:coverage]
basepython = python2.7
deps =
coverage==4.0.3
tox
commands =
# meta
tox -e py27-coverage
tox -e py27-subprocess-requests-cachecontrol-coverage
tox -e py36-requests-cachecontrol-coverage
tox -e py36-coverage
tox -e pypy-subprocess-requests-cachecontrol-coverage
python scripts/combine_coverage.py
coverage report
coverage html
open htmlcov/index.html
[testenv:style]
basepython = python2.7
deps =
twitter.checkstyle
commands =
twitterstyle -n ImportOrder {toxinidir}/pex {toxinidir}/tests
[testenv:isort-run]
basepython = python2.7
deps = isort
commands = isort -ns __init__.py -rc {toxinidir}/pex {toxinidir}/tests
[testenv:isort-check]
basepython = python2.7
deps = isort
commands = isort -ns __init__.py -rc -c {toxinidir}/pex {toxinidir}/tests
[testenv:docs]
changedir = docs
deps =
sphinx
sphinx-rtd-theme
commands =
sphinx-build -b html -d {envtmpdir}/doctrees . _build/html
open _build/html/index.html
[testenv:py27-repl]
commands = python2.7
[testenv:py27-run]
commands = pex {posargs:}
[testenv:py34-run]
commands = pex {posargs:}
[testenv:py27-package]
commands = pex --cache-dir {envtmpdir}/buildcache wheel requests . -o dist/pex27 -e pex.bin.pex:main -v
[testenv:py34-package]
commands = pex --cache-dir {envtmpdir}/buildcache wheel requests . -o dist/pex34 -e pex.bin.pex:main -v
[testenv:py35-package]
commands = pex --cache-dir {envtmpdir}/buildcache wheel requests . -o dist/pex35 -e pex.bin.pex:main -v
[testenv:py36-package]
commands = pex --cache-dir {envtmpdir}/buildcache wheel requests . -o dist/pex36 -e pex.bin.pex:main -v
[testenv:py37-package]
commands = pex --cache-dir {envtmpdir}/buildcache wheel requests . -o dist/pex37 -e pex.bin.pex:main -v
# Would love if you didn't have to enumerate environments here :-\
[testenv:py27]
[testenv:py27-requests]
[testenv:py27-requests-cachecontrol]
[testenv:py27-subprocess]
[testenv:py33]
[testenv:py33-requests]
[testenv:py33-requests-cachecontrol]
[testenv:py34]
[testenv:py34-requests]
[testenv:py34-requests-cachecontrol]
[testenv:py35]
[testenv:py35-requests]
[testenv:py35-requests-cachecontrol]
[testenv:py36]
[testenv:py36-requests]
[testenv:py36-requests-cachecontrol]
[testenv:py37]
[testenv:py37-requests]
[testenv:py37-requests-cachecontrol]
[testenv:pypy]
[testenv:pypy-requests]
[testenv:pypy-requests-cachecontrol]
[testenv:pypy-subprocess]
|