Skip to content

Commit

Permalink
added Coveralls for test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
FND committed Sep 7, 2013
1 parent ef499e3 commit f1d15a8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ python:
- 2.7

install:
- python setup.py develop
- pip install --use-mirrors \
`python -c 'from setup import META; print " ".join(META["extras_require"]["testing"] + META["install_requires"])'`
- pip install coveralls

script: make test
script:
- make remotes
- coverage run setup.py test
- coverage report -m

after_success: coveralls
19 changes: 18 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
import sys
import os

from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

from tiddlywebplugins.bfw import (__version__ as VERSION, __author__ as AUTHOR,
__license__ as LICENSE, __doc__ as DESC)


class PyTest(TestCommand):

def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)


META = {
'name': 'tiddlywebplugins.bfw',
'url': 'https://github.com/FND/tiddlywebplugins.bfw',
Expand All @@ -28,7 +43,9 @@
'extras_require': {
'testing': ['pytest', 'wsgi-intercept', 'httplib2'],
'coverage': ['figleaf', 'coverage']
}
},
'tests_require': ['pytest'],
'cmdclass': { 'test': PyTest }
}


Expand Down

0 comments on commit f1d15a8

Please sign in to comment.