forked from python-ldap/python-ldap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
99 lines (88 loc) · 2.8 KB
/
tox.ini
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# 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]
# Note: when updating Python versions, also change setup.py and .travis.yml
envlist = py27,py34,py35,py36,{py2,py3}-nosasltls,doc,py3-trace,coverage-report
minver = 1.8
[testenv]
deps = coverage
passenv = WITH_GCOV
# - Enable BytesWarning
# - Turn all warnings into exceptions.
# - 'ignore:the imp module is deprecated' is required to ignore import of 'imp'
# in distutils. Python < 3.6 use PendingDeprecationWarning; Python >= 3.6 use
# DeprecationWarning.
commands = {envpython} -bb -Werror \
"-Wignore:the imp module is deprecated:DeprecationWarning" \
"-Wignore:the imp module is deprecated:PendingDeprecationWarning" \
-m coverage run --parallel setup.py \
clean --all \
test
[testenv:py27]
# No warnings with Python 2.7
passenv = {[testenv]passenv}
commands = {envpython} \
-m coverage run --parallel setup.py test
[testenv:py34]
# No warnings with Python 3.4
passenv = {[testenv]passenv}
commands = {envpython} \
-m coverage run --parallel setup.py test
[testenv:py2-nosasltls]
basepython = python2
deps = {[testenv]deps}
passenv = {[testenv]passenv}
setenv =
CI_DISABLED=LDAPI:SASL:TLS
# rebuild without SASL and TLS, run without LDAPI
commands = {envpython} \
-m coverage run --parallel setup.py \
clean --all \
build_ext -UHAVE_SASL,HAVE_TLS \
test
[testenv:py3-nosasltls]
basepython = python3
deps = {[testenv]deps}
passenv = {[testenv]passenv}
setenv = {[testenv:py2-nosasltls]setenv}
commands = {[testenv:py2-nosasltls]commands}
[testenv:py3-trace]
basepython = python3
deps = {[testenv]deps}
passenv = {[testenv]passenv}
setenv =
PYTHON_LDAP_TRACE_LEVEL=9
PYTHON_LDAP_TRACE_FILE={envtmpdir}/trace.log
commands = {[testenv]commands}
[testenv:pypy]
# PyPy doesn't have working setup.py test
deps = pytest
commands = {envpython} -m pytest
[testenv:pypy35]
# PyPy-5.9.0
basepython = pypy3.5
deps = {[testenv:pypy]deps}
commands = {[testenv:pypy]commands}
[testenv:coverage-report]
deps = coverage
skip_install = true
commands =
{envpython} -m coverage combine
{envpython} -m coverage report --show-missing
{envpython} -m coverage html
[testenv:doc]
basepython = python3
deps =
docutils
markdown
sphinx
sphinxcontrib-spelling
commands =
{envpython} setup.py check --restructuredtext --metadata --strict
{envpython} -m markdown README -f {envtmpdir}/README.html
{envpython} -m sphinx -v -W -b html -d {envtmpdir}/doctrees \
{toxinidir}/Doc {envtmpdir}/html
{envpython} -m sphinx -v -W -b spelling -d {envtmpdir}/doctrees \
{toxinidir}/Doc {envtmpdir}/spelling