summaryrefslogtreecommitdiff
path: root/tox.ini
blob: a60696412234e794e9b39a3a0ef763c92a2f4080 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[tox]
envlist = {pypy,pep8,py27,py3}

[testenv]
usedevelop = True
deps =
    coverage
    -rrequirements.txt
    -rtest-requirements.txt
passenv =
    HOME
    http_proxy
    HTTP_PROXY
    https_proxy
    HTTPS_PROXY
    no_proxy
    NO_PROXY
whitelist_externals =
    bash
commands =
    /usr/bin/find . -type f -name "*.pyc" -delete

[testenv:coverage]
commands =
    coverage run -m pytest --capture=no --strict {posargs}
    coverage report -m --omit="*/test*" --fail-under=90

# environment used by the -infra templated docs job
[testenv:venv]
commands =
    {posargs}

[testenv:docs]
commands=
    bash -c "rm -rf doc/build"
    doc8 doc
    python setup.py build_sphinx

[doc8]
# Settings for doc8:
extensions = .rst

[testenv:releasenotes]
commands =
    sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:linters]
deps =
    {[testenv:pep8]deps}
commands =
    {[testenv:pep8]commands}

[testenv:integration]
commands =
    coverage run -m pytest --capture=no --strict "tests/int"

[testenv:unit]
commands =
    coverage run -m pytest --capture=no --strict "tests/unit"

[testenv:pep8]
deps =
    flake8
    flake8-import-order
    pep8-naming
commands =
    flake8 .

[testenv:py3pep8]
basepython = python3
deps =
    flake8
    flake8-import-order
    pep8-naming
commands =
    flake8 .

[flake8]
exclude = .tox,*.egg,.git,_build,docs-rst