-
Notifications
You must be signed in to change notification settings - Fork 51
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 #28 from jackwilsdon/test-improvements
Add flake8 checks and more Python versions for testing
- Loading branch information
Showing
17 changed files
with
214 additions
and
48 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,20 +1,42 @@ | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
- "pypy" | ||
sudo: false | ||
|
||
env: | ||
global: | ||
# Undocumented feature of nose-show-skipped. | ||
NOSE_SHOW_SKIPPED: 1 | ||
|
||
matrix: | ||
include: | ||
- python: 2.7 | ||
env: {TOXENV: py27-test} | ||
- python: 3.3 | ||
env: {TOXENV: py33-cov, COVERAGE: 1} | ||
- python: 3.4 | ||
env: {TOXENV: py34-test} | ||
- python: 3.5 | ||
env: {TOXENV: py35-test} | ||
- python: pypy | ||
env: {TOXENV: pypy-test} | ||
- python: 2.7 | ||
env: {TOXENV: py27-flake8} | ||
- python: 3.3 | ||
env: {TOXENV: py33-flake8} | ||
- python: 2.7 | ||
env: {TOXENV: docs} | ||
|
||
# To install dependencies, tell tox to do everything but actually running the | ||
# test. | ||
install: | ||
- pip install . | ||
- travis_retry python setup.py test -a "--notest" | ||
|
||
script: nosetests --with-coverage --cover-package=confuse | ||
script: python setup.py test | ||
|
||
# coveralls.io reporting, using https://github.com/coagulant/coveralls-python | ||
# Only report coverage for one version. | ||
before_script: | ||
- "[[ $TRAVIS_PYTHON_VERSION == '3.3' ]] && pip install coveralls || true" | ||
# Report coverage to codecov.io. | ||
before_install: | ||
- "[ ! -z $COVERAGE ] && travis_retry pip install codecov || true" | ||
after_success: | ||
- "[[ $TRAVIS_PYTHON_VERSION == '3.3' ]] && coveralls || true" | ||
- "[ ! -z $COVERAGE ] && codecov || true" | ||
|
||
sudo: false | ||
cache: | ||
pip: true |
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,12 @@ | ||
# Don't post a comment on pull requests. | ||
comment: off | ||
|
||
# I think this disables commit statuses? | ||
coverage: | ||
status: | ||
project: | ||
enabled: no | ||
patch: | ||
enabled: no | ||
changes: | ||
enabled: no |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env python | ||
import example | ||
|
||
example.main() |
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,20 @@ | ||
[nosetests] | ||
verbosity=1 | ||
logging-clear-handlers=1 | ||
eval-attr="!=slow" | ||
|
||
[flake8] | ||
min-version=2.7 | ||
# Default pyflakes errors we ignore: | ||
# - E241: missing whitespace after ',' (used to align visually) | ||
# - E221: multiple spaces before operator (used to align visually) | ||
# - E731: do not assign a lambda expression, use a def | ||
# - C901: function/method complexity | ||
# `flake8-future-import` errors we ignore: | ||
# - FI50: `__future__` import "division" present | ||
# - FI51: `__future__` import "absolute_import" present | ||
# - FI12: `__future__` import "with_statement" missing | ||
# - FI53: `__future__` import "print_function" present | ||
# - FI14: `__future__` import "unicode_literals" missing | ||
# - FI15: `__future__` import "generator_stop" missing | ||
ignore=C901,E241,E221,E731,FI50,FI51,FI12,FI53,FI14,FI15 |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from __future__ import division, absolute_import, print_function | ||
|
||
import confuse | ||
import tempfile | ||
import shutil | ||
|
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from __future__ import division, absolute_import, print_function | ||
|
||
import confuse | ||
import textwrap | ||
import unittest | ||
|
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
Oops, something went wrong.