Skip to content

Commit

Permalink
upgrade testing, multiple python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
stavxyz committed Apr 25, 2016
1 parent 54919bb commit 41a04d4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 37 deletions.
7 changes: 4 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ machine:

dependencies:
override:
- pip install tox
- pip install python-coveralls
- pip install -U pip
- pip install -U tox tox-pyenv python-coveralls
- pyenv local 2.7.9 3.4.3 3.5.0

test:
override:
- env PATH="$HOME/bin:$PATH" tox
- tox -v
post:
- mkdir -p $CIRCLE_ARTIFACTS/coverage
- mkdir -p $CIRCLE_TEST_REPORTS/xunit
Expand Down
16 changes: 12 additions & 4 deletions pylintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
[Messages Control]
# W0511: TODOs in code comments are fine.
# W0142: *args and **kwargs are fine.
disable=W0511,W0142
disable=
bad-builtin,
locally-disabled,
fixme

[BASIC]
# Don't require docstrings on tests or Python Special Methods
no-docstring-rgx=(__.*__|[tT]est.*|setUp|tearDown)
no-docstring-rgx=(__.*__|[tT]est.*|setUp|tearDown)
# Some names we are okay with
good-names=f,e,i,j,k,v,ex,_,x,y,z

[REPORTS]
msg-template={msg_id}({symbol}): {path},{line}: {msg} | {obj}
reports=yes
output-format=colorized
41 changes: 11 additions & 30 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
[tox]
# Only the following setting are valid in this section and in the Jenkins section
# https://tox.readthedocs.org/en/latest/config.html#tox-global-settings
envlist = py27,py34,py35,style

# minversion=ver # minimally required tox version
# toxworkdir=path # tox working directory, defaults to {toxinidir}/.tox
# setupdir=path # defaults to {toxinidir}
# distdir=path # defaults to {toxworkdir}/dist
# distshare=path # defaults to {homedir}/.tox/distshare
# envlist=ENVLIST # defaults to the list of all environments
# skipsdist=BOOL # defaults to false
envlist = py27
skipsdist = True


##############
# DEFAULT #
##############
[testenv]
# This is the default setup. All other environments will inherit these settings
usedevelop = True
install_command = pip install --verbose --pre --exists-action=w {opts} {packages}
basepython = python
pyflake_codes = F401,F402,F403,F404,F811,F812,F821,F822,F823,F831,F841

# pull in dependencies from our pip-* files
install_command = pip install --verbose -U --pre {opts} {packages}
deps= -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt

commands=
nosetests {posargs} --with-doctest --with-coverage --cover-html --cover-package=requests_chef --cover-html-dir=coverage/ --with-xunit
flake8 --select="{[testenv]pyflake_codes}" {posargs:requests_chef}
flake8 --exit-zero -j 1 {posargs:requests_chef}
/bin/bash -c 'pylint requests_chef --rcfile=pylintrc || exit 0'
python -c "import sys;print('\nPYTHON VERSION\n%s\n' % sys.version)"
nosetests {posargs} --verbose --with-doctest --with-coverage --cover-html --cover-package=requests_chef --cover-html-dir=coverage/ --with-xunit

[testenv:style]
basepython = python2.7
commands =
flake8 requests_chef setup.py --statistics
flake8 tests --statistics --ignore D100,D101,D102
pylint requests_chef setup.py


[flake8]
#flake8 default settings
exclude = tests
max-complexity = 12

0 comments on commit 41a04d4

Please sign in to comment.