]> git.phdru.name Git - cookiecutter.git/blob - project_template/tox.ini
Fix development requirements: add pytest-cov and tox
[cookiecutter.git] / project_template / tox.ini
1 [tox]
2 minversion = 1.8
3 toxworkdir={homedir}/.tox/{project}
4 envlist = {py26,py27,py33,py34,py35,py36},{py27,py36}-flake8
5
6 # Base test environment settings
7 [testenv]
8 basepython =
9     py27: {env:TOXPYTHON:python2.7}
10     py33: {env:TOXPYTHON:python3.3}
11     py34: {env:TOXPYTHON:python3.4}
12     py35: {env:TOXPYTHON:python3.5}
13     py36: {env:TOXPYTHON:python3.6}
14     pypy: {env:TOXPYTHON:pypy}
15 commands =
16     {envpython} --version
17     {envpython} -c "import struct; print(struct.calcsize('P') * 8)"
18 deps =
19     pytest
20     pytest-cov
21     py26: argparse
22     py26,py27: m_lib>=2.0
23     py34: m_lib>=3.0
24 sitepackages = True
25 # Don't fail or warn on uninstalled commands
26 whitelist_externals =
27     flake8
28
29 [general]
30 commands =
31     python -m pytest --cov={project}
32
33 [testenv:py26]
34 commands =
35     {[testenv]commands}
36     {[general]commands}
37
38 [testenv:py27]
39 commands =
40     {[testenv]commands}
41     {[general]commands}
42
43 [testenv:py34]
44 commands =
45     {[testenv]commands}
46     {[general]commands}
47
48 [testenv:py27-flake8]
49 deps =
50     flake8
51 commands = flake8
52
53 [testenv:py34-flake8]
54 deps =
55     flake8
56 commands = flake8