Skip to content

Commit

Permalink
Add coverage to travis and setup.py test
Browse files Browse the repository at this point in the history
  • Loading branch information
tilgovi committed Mar 6, 2015
1 parent 174f85d commit 2ad8da4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ before_install:
install:
- gem install sass
- gem install compass
- pip install coveralls
- pip install prospector
- make
services:
Expand All @@ -19,6 +20,8 @@ script:
- hypothesis-buildext production.ini chrome --base https://hypothes.is --assets chrome-extension://notarealkey/public
- hypothesis-buildext development.ini firefox --base http://localhost
- hypothesis-buildext production.ini firefox --base https://hypothes.is --assets resource://notarealkey/hypothesis/data
after_success:
- coveralls
notifications:
irc:
channels:
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Hypothesis
.. image:: https://travis-ci.org/hypothesis/h.svg?branch=master
:target: https://travis-ci.org/hypothesis/h
:alt: Build Status
.. image:: https://coveralls.io/repos/hypothesis/h/badge.svg
:target: https://coveralls.io/r/hypothesis/h
:alt: Code Coverage
.. image:: https://landscape.io/github/hypothesis/h/master/landscape.svg?style=flat
:target: https://landscape.io/github/hypothesis/h/master
:alt: Code Health
Expand Down
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,20 @@


class PyTest(TestCommand):
user_options = [
('cov', None, 'measure coverage')
]

def initialize_options(self):
TestCommand.initialize_options(self)
self.cov = None

def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['h']
self.test_suite = True
if self.cov:
self.test_args += ['--cov', 'h']

def run_tests(self):
import pytest
Expand Down

0 comments on commit 2ad8da4

Please sign in to comment.