-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from Natim/add_pep8_checks
Add tox to check the PEP8 + Fix current code PEP8.
- Loading branch information
Showing
12 changed files
with
71 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
# Config file for automatic testing at travis-ci.org | ||
|
||
language: python | ||
python: 2.7 | ||
env: | ||
- TOX_ENV=py26 | ||
- TOX_ENV=py27 | ||
- TOX_ENV=py33 | ||
- TOX_ENV=py34 | ||
- TOX_ENV=pypy | ||
- TOX_ENV=flake8 | ||
|
||
python: | ||
- "3.3" | ||
- "2.7" | ||
- "2.6" | ||
- "pypy" | ||
script: tox -e $TOX_ENV | ||
|
||
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors | ||
# Note: we only use coveralls with Travis, not tox. pip install coveralls doesn't work on Windows. | ||
# This setup makes it possible for: | ||
# 1. the tests to be run with tox on Windows | ||
# 2. Windows users to use the requirements files without running into installation problems. | ||
install: | ||
- pip install coveralls | ||
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r requirements/test_26.txt; fi | ||
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install -r requirements/test_27.txt; fi | ||
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install -r requirements/test_27.txt; fi | ||
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then pip install -r requirements/test_33.txt; fi | ||
|
||
# command to run tests, e.g. python setup.py test | ||
script: coverage run --source cookiecutter setup.py test | ||
- pip install tox | ||
|
||
after_success: | ||
coveralls | ||
# Report coverage results to coveralls.io | ||
- pip install coveralls | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
import errno | ||
import logging | ||
import os | ||
import sys | ||
import stat | ||
import shutil | ||
import contextlib | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,28 @@ | ||
[tox] | ||
envlist = py26, py27, py33, py34, pypy | ||
envlist = py26, py27, py33, py34, pypy, flake8 | ||
|
||
[testenv:py26] | ||
deps = -r{toxinidir}/requirements/test_26.txt | ||
commands = python setup.py test | ||
commands = coverage run --source cookiecutter setup.py test | ||
|
||
[testenv:py27, pypy] | ||
[testenv:py27] | ||
deps = -r{toxinidir}/requirements/test_27.txt | ||
commands = python setup.py test | ||
commands = coverage run --source cookiecutter setup.py test | ||
|
||
[testenv:pypy] | ||
deps = -r{toxinidir}/requirements/test_27.txt | ||
commands = coverage run --source cookiecutter setup.py test | ||
|
||
[testenv:py33] | ||
deps = -r{toxinidir}/requirements/test_33.txt | ||
commands = python setup.py test | ||
commands = coverage run --source cookiecutter setup.py test | ||
|
||
[testenv:py34] | ||
deps = -r{toxinidir}/requirements/test_34.txt | ||
commands = python setup.py test | ||
commands = coverage run --source cookiecutter setup.py test | ||
|
||
[testenv:flake8] | ||
deps = | ||
flake8 | ||
commands = | ||
flake8 cookiecutter |