summaryrefslogtreecommitdiff
path: root/tox.ini
blob: e0e7780df632e2e7e29c68d5b631ab2d62259b51 (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]
envlist =
# Jython support pending 2.7 support, due 2012-07-15 or so.  See:
# http://fwierzbicki.blogspot.com/2012/03/adconion-to-fund-jython-27.html
    py27,py35,py36,py37,py38,py27-minimal,pypy,pypy3,docs,coverage

[mindeps]
deps =
    .[mintests]

[fulldeps]
deps =
    .[test]

[testenv]
usedevelop = true
deps =
    !minimal: {[fulldeps]deps}
    minimal: {[mindeps]deps}
    .[docs]
commands =
# Temporary workaround. Avoid zope.testrunner pending
# IRO fixes in zope.security. https://github.com/zopefoundation/zope.security/issues/71
    python -m unittest discover -s src
    !minimal: sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
setenv =
    ZOPE_INTERFACE_STRICT_IRO = 1
    pure: PURE_PYTHON = 1

[testenv:docs]
basepython =
    python3
commands =
    sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
    sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
deps =
    {[fulldeps]deps}
    .[docs]
setenv =
    ZOPE_INTERFACE_STRICT_IRO = 0

[testenv:coverage]
basepython =
    python3
usedevelop = true
commands =
    coverage run -m unittest discover -s src
    coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
    coverage report --fail-under=100
deps =
    {[testenv]deps}
    coverage