diff options
author | jquast <contact@jeffquast.com> | 2014-09-06 16:55:06 -0700 |
---|---|---|
committer | jquast <contact@jeffquast.com> | 2014-09-06 16:55:06 -0700 |
commit | 207530c4d9af765e771eccc49e3934d410604cc7 (patch) | |
tree | 5ef6b738ef2fe7abd40a276e07da42ed52cd4fa8 | |
parent | a0458cbf31cd0bdef1ada4aaefd7726a10766be1 (diff) | |
download | blessings-207530c4d9af765e771eccc49e3934d410604cc7.tar.gz |
travis, tox, and coveralls -- combine coverage
though, it is not possible to combine coverage
across python interpreters in travis, as to each
their own.
-rw-r--r-- | .travis.yml | 12 | ||||
-rwxr-xr-x | setup.py | 6 | ||||
-rw-r--r-- | tox.ini | 34 |
3 files changed, 26 insertions, 26 deletions
diff --git a/.travis.yml b/.travis.yml index 096938b..5471d12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py33 - - TOXENV=py34 - TOXENV=pypy + - TOXENV=py34 install: - pip install -q tox @@ -13,13 +13,13 @@ install: # for python versions <27, we must install ordereddict # mimicking the same dynamically generated 'requires=' # in setup.py - - if [[ $TOXENV == "py25" ]] || [[ $TOXENV == "py26" ]]; then + - if [[ "${TOXENV}" == "py25" ]] || [[ "${TOXENV}" == "py26" ]]; then pip install -q ordereddict; fi # for python version =27, install coverage, coveralls. # (coverage only measured and published for one version) - - if [[ $TOXENV == "py27" ]]; then + - if [[ "${TOXENV}" == "py34" ]]; then pip install -q coverage coveralls; fi @@ -28,7 +28,11 @@ script: - tox -e $TOXENV after_success: - - if [[ "${TOXENV}" == "py27" ]]; then + - if [[ "${TOXENV}" == "py34" ]]; then + for f in ._coverage*; do + mv $f `echo $f | tr -d '_'` + done + coverage combine coveralls; fi @@ -5,11 +5,14 @@ import setuptools import setuptools.command.develop import setuptools.command.test +here = os.path.dirname(__file__) + class SetupDevelop(setuptools.command.develop.develop): def run(self): assert os.getenv('VIRTUAL_ENV'), 'You should be in a virtualenv' - self.spawn(('pip', 'install', '-U', 'tox',)) + self.spawn(('pip', 'install', '-U', '-r', + os.path.join(here, 'dev-requirements.txt'))) setuptools.command.develop.develop.run(self) @@ -27,7 +30,6 @@ def main(): if sys.version_info < (2, 7,): extra['install_requires'].extend(['ordereddict>=1.1']) - here = os.path.dirname(__file__) setuptools.setup( name='blessed', version='1.9.4', @@ -5,32 +5,26 @@ envlist = py26, py34, pypy +skip_missing_interpreters = true [testenv] -# for any python, run simple pytest -# with pep8 and pyflake checking -usedevelop = True -deps = pytest - pytest-cov - pytest-pep8 - pytest-flakes - mock - -rrequirements.txt - -whitelist_externals = /bin/bash +whitelist_externals = /bin/bash /bin/mv setenv = PYTHONIOENCODING=UTF8 +usedevelop=True -# run each test twice -- 1. w/o tty -commands = /bin/bash -c {envbindir}/py.test -v \ +# run each test twice +# -- 1. w/o tty +commands = /bin/bash -c '{envbindir}/py.test \ -x --strict --pep8 --flakes \ - --cov-report term-missing \ - blessed/tests {posargs} \ - < /dev/null 2>&1 | tee /dev/null -# -- 2. w/tty - {envbindir}/py.test -v \ + --cov blessed blessed/tests {posargs} \ + < /dev/null 2>&1 | tee /dev/null' + /bin/mv {toxinidir}/.coverage {toxinidir}/._coverage.{envname}.notty + +# -- 2. w/tty + /bin/bash -c '{envbindir}/py.test \ -x --strict --pep8 --flakes \ - --cov-report term-missing \ - blessed/tests {posargs} + --cov blessed blessed/tests {posargs}' + /bin/mv {toxinidir}/.coverage {toxinidir}/._coverage.{envname}.withtty [pytest] # py.test fixtures conflict with pyflakes |