Skip to content

Commit

Permalink
BF: fix broken coverage runs in virtualenv
Browse files Browse the repository at this point in the history
Now we're running in our own virtualenv, coverage was trying to cover
everything we imported.  I have no idea why that is, but futzing on a VM
similar to the travis machines seemed to recover the right behavior.
  • Loading branch information
matthew-brett committed Nov 16, 2014
1 parent 1ca2da4 commit 20ff9e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ branch = True
source = nibabel, nisext
include = */nibabel/*, */nisext/*
omit =
nibabel/externals/*
nibabel/benchmarks/*
nisext/ast.py
nisext/codegen.py
*/externals/*
*/benchmarks/*
*/ast.py
*/codegen.py
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ matrix:
include:
- python: 2.7
env:
- COVERAGE=--with-coverage
- COVERAGE=1
# Absolute minimum dependencies
- python: 2.7
env:
Expand All @@ -37,7 +37,7 @@ before_install:
pip install pydicom;
fi
fi
- if [ "${COVERAGE}" == "--with-coverage" ]; then
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage;
pip install coveralls;
fi
Expand All @@ -51,7 +51,10 @@ script:
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
- if [ "${COVERAGE}" == "--with-coverage" ]; then cp ../.coveragerc .; fi
- nosetests --with-doctest $COVERAGE `python -c "import os; import nibabel; print(os.path.dirname(nibabel.__file__))"`
- if [ "${COVERAGE}" == "1" ]; then
cp ../.coveragerc .;
COVER_ARGS="--with-coverage --cover-package nibabel";
fi
- nosetests --with-doctest $COVER_ARGS nibabel
after_success:
- if [ "${COVERAGE}" == "--with-coverage" ]; then coveralls; fi
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi

0 comments on commit 20ff9e5

Please sign in to comment.