Skip to content

Commit

Permalink
use tox for running tests on all support python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
brad committed Apr 8, 2014
1 parent c9799e3 commit 2ad7f3f
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*.pyc
*.DS_Store
.coverage
.tox
*~
docs/_build
*.egg-info
Expand Down
18 changes: 11 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
language: python

python:
- 2.6
- 2.7

install: pip install coveralls
script: coverage run --source=fitbit setup.py test
python: 3.3
env:
- TOX_ENV=pypy
- TOX_ENV=py34
- TOX_ENV=py33
- TOX_ENV=py32
- TOX_ENV=py27
- TOX_ENV=py26
install:
- pip install coveralls tox
script: tox -e $TOX_ENV
after_success: coveralls
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include LICENSE AUTHORS README.md requirements* docs/*
include LICENSE AUTHORS README.md requirements/* docs/*
File renamed without changes.
5 changes: 5 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r base.txt
-r test.txt

Sphinx==1.2.2
tox==1.7.1
2 changes: 2 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mock==1.0.1
coverage==3.7.1
4 changes: 0 additions & 4 deletions requirements_dev.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements_test.txt

This file was deleted.

6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

from setuptools import setup

required = [line for line in open('requirements.txt').read().split("\n")]
required_dev = [line for line in open('requirements_dev.txt').read().split("\n") if not line.startswith("-r")]
required = [line for line in open('requirements/base.txt').read().split("\n")]
required_test = [line for line in open('requirements/test.txt').read().split("\n") if not line.startswith("-r")]

fbinit = open('fitbit/__init__.py').read()
author = re.search("__author__ = '([^']+)'", fbinit).group(1)
Expand All @@ -27,7 +27,7 @@
install_requires=["distribute"] + required,
license='Apache 2.0',
test_suite='fitbit_tests.all_tests',
tests_require=required_dev,
tests_require=required_test,
classifiers=(
'Intended Audience :: Developers',
'Natural Language :: English',
Expand Down
24 changes: 24 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tox]
envlist = pypy,py34,py33,py32,py27,py26

[testenv]
commands = coverage run --source=fitbit setup.py test
deps = -r{toxinidir}/requirements/test.txt

[testenv:pypy]
basepython = pypy

[testenv:py34]
basepython = python3.4

[testenv:py33]
basepython = python3.3

[testenv:py32]
basepython = python3.2

[testenv:py27]
basepython = python2.7

[testenv:py26]
basepython = python2.6

0 comments on commit 2ad7f3f

Please sign in to comment.