Switch to using tox for testing
This allows easier testing of multiple versions of Python in a more automated fashion. This is needed if we're ever going to make some of the planned extensive refactorings. This change: * adds tox.ini * updates Makefile and .travis.yml to point to tox * fixes a doctest typo found while make sure the Makefile targets work * adds a [docs] extras_require so that the deps in tox are managed cleanly The pep8 target is currently commented out because it fails (and has done for a long time). Will fix asap. This commit is to ensure that travis is working. Followups will tune it up.
This commit is contained in:
parent
28f93239cd
commit
57d6a28b26
25
.travis.yml
25
.travis.yml
|
@ -1,11 +1,20 @@
|
|||
sudo: false
|
||||
language: python
|
||||
python:
|
||||
- 2.7
|
||||
- 3.3
|
||||
- 3.4
|
||||
- 3.5
|
||||
script: make test
|
||||
|
||||
- "3.5"
|
||||
install:
|
||||
- pip install \
|
||||
`python -c 'from setup import META; print(" ".join(META["extras_require"]["testing"]))'`
|
||||
- pip install tox
|
||||
script:
|
||||
- tox
|
||||
env:
|
||||
- TOXENV=py27
|
||||
- TOXENV=py33
|
||||
- TOXENV=py34
|
||||
- TOXENV=py35
|
||||
- TOXENV=pypy
|
||||
# XXX: known to fail, fixes to follow
|
||||
#- TOXENV=pep8
|
||||
- TOXENV=docs
|
||||
|
||||
notifications:
|
||||
irc: "chat.freenode.net#gabbi"
|
||||
|
|
4
Makefile
4
Makefile
|
@ -24,7 +24,7 @@ reclean:
|
|||
cd docs && make clean
|
||||
|
||||
test:
|
||||
py.test --tb=short -x test
|
||||
tox --skip-missing-interpreters
|
||||
|
||||
doctest:
|
||||
cd docs && make doctest
|
||||
|
@ -39,6 +39,6 @@ pypi:
|
|||
python setup.py sdist upload
|
||||
|
||||
docs:
|
||||
cd docs && $(MAKE) html
|
||||
tox -edocs
|
||||
|
||||
release: clean test tagv reclean pypi
|
||||
|
|
|
@ -27,6 +27,6 @@ Example:
|
|||
url = 'http://{0}:{1}/'.format(host, port)
|
||||
urllib3_intercept.install()
|
||||
add_wsgi_intercept(host, port, make_app)
|
||||
resp = pool.requests('GET', url)
|
||||
resp = pool.request('GET', url)
|
||||
assert resp.data == b'Whee'
|
||||
urllib3_intercept.uninstall()
|
||||
|
|
3
setup.py
3
setup.py
|
@ -40,6 +40,9 @@ META = {
|
|||
'requests>=2.0.1',
|
||||
'urllib3>=1.11.0',
|
||||
],
|
||||
'docs': [
|
||||
'sphinx',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
[tox]
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
envlist = py27,py33,py34,py35,pypy,pep8,docs
|
||||
|
||||
[testenv]
|
||||
deps = .[testing]
|
||||
usedevelop = True
|
||||
commands = py.test test
|
||||
passenv = WSGI_INTERCEPT_*
|
||||
|
||||
[testenv:pep8]
|
||||
deps = flake8
|
||||
commands =
|
||||
flake8
|
||||
|
||||
[testenv:docs]
|
||||
deps = .[docs]
|
||||
commands =
|
||||
python setup.py build_sphinx
|
||||
whitelist_externals =
|
||||
rm
|
||||
|
||||
[flake8]
|
||||
exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,docs
|
||||
show-source = True
|
Loading…
Reference in New Issue