summaryrefslogtreecommitdiff
path: root/tox.ini
blob: dbdebffe3783fc7e185251b001cd1110cf258182 (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
[tox]
envlist =
    py27,py27-pure,
    py35,py35-pure,
    py36,
    py37,
    py38,py38-cext,
    py39,
    pypy,
    pypy3,
    coverage,
    docs
# NB: if you add new environments, please also add them to depends in
# testenv:coverage so that parallel runs (tox -p auto) will work correctly

[testenv]
# ``usedevelop`` is required otherwise unittest complains that it
# discovers a file in src/... but imports it from .tox/.../
# ``skip_install`` also basically works, but that causes the ``extras``
# not to be installed (though ``deps`` still are), and doesn't
# rebuild C extensions.
usedevelop = true
commands =
    coverage run -p -m unittest discover -s src
extras = test
setenv =
    ZOPE_INTERFACE_STRICT_IRO=1

[testenv:py27-pure]
setenv =
    PURE_PYTHON=1

[testenv:py35-pure]
setenv =
    PURE_PYTHON=1

[testenv:py38-cext]
# Require the C extension
setenv =
    PURE_PYTHON=0

[testenv:py]
commands =
    python --version
    {[testenv]commands}

[testenv:coverage]
# The -i/--ignore arg is necessary; we get
# No source for code: '//.tox/pypy/site-packages/zope/interface/__init__.py'
# without it.
commands =
    coverage combine
    coverage report -i
    coverage html -i
    coverage xml -i
depends = py27,py27-pure,py35,py35-pure,py36,py37,py38,py38-cext,py39,pypy,pypy3,docs
parallel_show_output = true

[testenv:docs]
basepython =
    python3
commands =
    sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
    coverage run -p -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctest
deps =
    Sphinx
    repoze.sphinx.autointerface
setenv =
    ZOPE_INTERFACE_STRICT_IRO=0