Skip to content

Commit

Permalink
Make coverage call more platform-agnostic
Browse files Browse the repository at this point in the history
This allows the Makefile to work on debian where coverage
was installed via the python-coverage debian package.
  • Loading branch information
Gilles Dubuc committed May 23, 2016
1 parent d156673 commit 1a81374
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
COVERAGE = $(or $(shell which coverage), $(shell which python-coverage), coverage)

setup:
@pip install -Ue.\[tests\]

test:
@coverage run --branch `which nosetests` -v --with-yanc -s tests/
@$(COVERAGE) run --branch `which nosetests` -v --with-yanc -s tests/

coverage:
@coverage report -m --fail-under=30
@$(COVERAGE) report -m --fail-under=30

focus:
@coverage run --branch `which nosetests` -vv --with-yanc --logging-level=WARNING --with-focus -i -s tests/
@$(COVERAGE) run --branch `which nosetests` -vv --with-yanc --logging-level=WARNING --with-focus -i -s tests/

0 comments on commit 1a81374

Please sign in to comment.