~harlowja/cloud-init/tox-venvs

« back to all changes in this revision

Viewing changes to tox.ini

  • Committer: Joshua Harlow
  • Date: 2014-01-26 01:00:38 UTC
  • Revision ID: harlowja@gmail.com-20140126010038-smsyr4lztcjrpk81
Use a venv for testing and for lint checking

Remove the pep8 & pylint tools and use a venv
with tox instead. Also create a venv that will
run for the given python version to perform the
cloud-init tests.

These help remove the need to install the same
dependencies in the root python environment env
to just run the standard set of tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[tox]
 
2
minversion = 1.6
 
3
skipsdist = True
 
4
envlist = py26,py27,py33
 
5
 
 
6
[testenv]
 
7
usedevelop = True
 
8
setenv = VIRTUAL_ENV={envdir}
 
9
         LANG=en_US.UTF-8
 
10
         LANGUAGE=en_US:en
 
11
         LC_ALL=C
 
12
deps = -r{toxinidir}/requirements.txt
 
13
       -r{toxinidir}/test-requirements.txt
 
14
commands = nosetests {posargs}
 
15
install_command = pip install {opts} {packages}
 
16
 
 
17
[testenv:venv]
 
18
commands = {posargs}
 
19
 
 
20
[testenv:flake8]
 
21
commands = flake8 {posargs}
 
22
 
 
23
[flake8]
 
24
# See: http://pylint-messages.wikidot.com/all-codes
 
25
# W0142: *args and **kwargs are fine.
 
26
# W0511: TODOs in code comments are fine.
 
27
# W0702: No exception type(s) specified
 
28
# W0703: Catch "Exception"
 
29
# C0103: Invalid name
 
30
# C0111: Missing docstring
 
31
# F841: local variable ABC is assigned to but never used
 
32
# E121: Continuation line indentation is not a multiple of four
 
33
# E123: Closing bracket does not match indentation of opening bracket's line
 
34
# E124: Closing bracket missing visual indentation
 
35
# E125: Continuation line does not distinguish itself from next logical line
 
36
# E126: Continuation line over-indented for hanging indent
 
37
# E127: Continuation line over-indented for visual indent
 
38
# E128: Continuation line under-indented for visual indent
 
39
# E502: The backslash is redundant between brackets
 
40
# H201: no 'except:' at least use 'except Exception:'
 
41
# H232: Python 3.x incompatible octal X should be written as Y
 
42
# H233: Python 3.x incompatible use of print operator
 
43
# H234: assertEquals is deprecated, use assertEqual
 
44
# H301: one import per line
 
45
# H302: import only modules.
 
46
# H404: multi line docstring should start without a leading new line
 
47
ignore = F841,E121,E123,E124,E125,E126,E127,E128,E502,H234,H201,H301,H404,H302,H232,H233,W0142,W0511,W0702,W0703,C0103,C0111
 
48
exclude = .venv,.tox,dist,doc,*egg,.bzr,build,tools
 
49
max-line-length = 79