~canonical-sysadmins/charms/trusty/memcached/trunk

« back to all changes in this revision

Viewing changes to tox.ini

  • Committer: Felipe Reyes
  • Date: 2016-05-13 18:30:55 UTC
  • mto: This revision was merged to the branch mainline in revision 74.
  • Revision ID: felipe.reyes@canonical.com-20160513183055-bdwok49wp1em1y6t
Add tox support and port to python3

The port to python3 uncovered some flaws in the unit tests around the mock
of functions, now the tests are more strict

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[tox]
 
2
envlist = pep8,py27,py34,py35
 
3
skipsdist = True
 
4
 
 
5
[testenv]
 
6
setenv = VIRTUAL_ENV={envdir}
 
7
         PYTHONHASHSEED=0
 
8
install_command =
 
9
  pip install --allow-unverified python-apt {opts} {packages}
 
10
commands = nosetests -s --nologcapture {posargs} unit_tests/
 
11
 
 
12
# trusty
 
13
[testenv:py27]
 
14
basepython = python2.7
 
15
deps = -r{toxinidir}/test-requirements-py2.txt
 
16
 
 
17
# trusty
 
18
[testenv:py34]
 
19
basepython = python3.4
 
20
deps = -r{toxinidir}/test-requirements-py3.txt
 
21
 
 
22
# xenial
 
23
[testenv:py35]
 
24
basepython = python3.5
 
25
deps = -r{toxinidir}/test-requirements-py3.txt
 
26
 
 
27
[testenv:pep8]
 
28
basepython = python2.7
 
29
deps = -r{toxinidir}/test-requirements-py2.txt
 
30
commands = flake8 {posargs} hooks unit_tests tests
 
31
           charm-proof
 
32
 
 
33
[testenv:venv]
 
34
commands = {posargs}
 
35
 
 
36
[flake8]
 
37
ignore = E402,E226
 
38
exclude = hooks/charmhelpers