Skip to content

Commit

Permalink
Add Tox support and reporting of test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
moreati committed Jul 28, 2015
1 parent 03a5748 commit 3d55949
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[run]
source = u2flib_server

[report]
exclude_lines =
pragma: no cover
if __name__ == '__main__':
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
*.pyc
*.egg
*.egg-info
build/
dist/
.eggs/
.ropeproject/
ChangeLog

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*

# Pycharm and IntelliJ
.idea
.idea
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y swig
script: python setup.py test

install:
- pip install -r dev-requirements.txt
- pip install -e .

script:
- coverage run setup.py test

after_success:
- coveralls
2 changes: 2 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage
coveralls
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tox]
envlist =
py26
py27

[testenv]
develop = True
deps =
-r{toxinidir}/dev-requirements.txt
commands =
coverage run setup.py test
coverage report
coverage html

0 comments on commit 3d55949

Please sign in to comment.