Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tox: run py27,py35 envs by default; define a separate 'coverage' tox …
…environment (useful for running it locally)
- Loading branch information
Cosimo Lupo
committed
Nov 1, 2016
1 parent
2494eea
commit 37835fc
Showing
1 changed file
with
15 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,38 @@ | ||
[tox] | ||
envlist = py27, pypy, py34, py35 | ||
envlist = py27, py35 | ||
|
||
[testenv] | ||
basepython = | ||
py27: {env:TOXPYTHON:python2.7} | ||
pypy: {env:TOXPYTHON:pypy} | ||
py34: {env:TOXPYTHON:python3.4} | ||
py35: {env:TOXPYTHON:python3.5} | ||
deps = | ||
pytest | ||
-rrequirements.txt | ||
install_command = | ||
{envpython} -m pip install -v {opts} {packages} | ||
commands = | ||
# check that we have the expected Python version and architecture | ||
{envpython} -c "import sys; print(sys.version)" | ||
# run the test suite | ||
py.test | ||
# run the test suite against the package installed inside tox env | ||
py.test {posargs:--pyargs defcon} | ||
|
||
[testenv:coverage] | ||
basepython = {env:TOXPYTHON:python3.5} | ||
deps = | ||
{[testenv]deps} | ||
pytest-cov | ||
skip_install = true | ||
commands= | ||
# measure test coverage and create html report | ||
py.test --cov --cov-report html {posargs} | ||
|
||
[testenv:coveralls] | ||
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH | ||
basepython=python3.5 | ||
deps = | ||
{[testenv]deps} | ||
pytest-cov | ||
{[testenv:coverage]deps} | ||
coveralls | ||
skip_install = true | ||
ignore_outcome = true | ||
commands= | ||
# measure test coverage and upload report to coveralls | ||
py.test --cov=Lib/defcon | ||
py.test --cov | ||
coveralls | ||
|
||
[pytest] | ||
minversion = 2.8 | ||
testpaths = | ||
Lib/defcon | ||
python_files = | ||
test_*.py | ||
python_classes = | ||
*Test | ||
addopts = | ||
# run py.test in verbose mode | ||
-v | ||
# show extra test summary info | ||
-r a |