Skip to content

Commit

Permalink
TST: Add flake8 testing for new additions
Browse files Browse the repository at this point in the history
Add flake8 testing for new additions
Only applies to main code for now, not test code
  • Loading branch information
bashtage committed Dec 30, 2016
1 parent 42d2f57 commit 0780c3c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ before_install:

# Install packages
install:
- conda create --yes --quiet -n statsmodels-test ${PKGS} ${OPTIONAL} nose pip pyyaml setuptools
- conda create --yes --quiet -n statsmodels-test ${PKGS} ${OPTIONAL} nose pip pyyaml setuptools flake8
- source activate statsmodels-test
- if [ ${COVERAGE} = true ]; then pip install coverage coveralls; fi
- python setup.py install
Expand All @@ -118,7 +118,12 @@ script:
# Compose a script to run testing with coverage
- echo 'import statsmodels as sm; a=sm.test(label="full", verbose=3); import sys; sys.exit((len(a.failures)+len(a.errors))>0)' > test.py
- if [ ${COVERAGE} = true ]; then coverage run --rcfile=${SRCDIR}/.travis_coveragerc test.py; else python test.py; fi
- cd ${SRCDIR}
- git remote add upstream https://github.com/statsmodels/statsmodels.git
- git fetch upstream
- find . -type f ! -name "test*.py" -name "*.py" -path "./statsmodels/*" | xargs git diff upstream/master | flake8 --diff

after_success:
# Coverage only for 2.7
- cd "${SRCDIR}/travis-test"
- if [ ${COVERAGE} = true ]; then coveralls --rcfile=${SRCDIR}/.travis_coveragerc; fi

0 comments on commit 0780c3c

Please sign in to comment.