summaryrefslogtreecommitdiffstats
path: root/tox.ini
blob: 7fd6b841fdbc05249cd0fbf5d3d744d0e51b9416 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = py27,pep8
skipsdist = True

[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
deps =
  -rrequirements.txt
  -rtest-requirements.txt
commands=
  py.test \
    --basetemp={envtmpdir} \
    --cov \
    --cov-report term-missing \
    --cov-report xml \
    {posargs}
setenv=
  HOME = {envtmpdir}
  PYTHONPATH = {toxinidir}

[testenv:pep8]
usedevelop = False
deps = flake8
commands = flake8 {toxinidir}

[testenv:docs]
usedevelop = False
deps = -rdocs/requirements.txt
commands =
    sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html

[testenv:docs-linkcheck]
commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck

[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.

show-source = True
ignore = E123,E125,H803,E501
builtins = _
exclude = build,dist,doc,legacy,.eggs,.git,.tox,.venv

[pytest]
testpaths = tests
python_functions = test_*