forked from python-ldap/python-ldap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
101 lines (92 loc) · 2.84 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
100
101
# 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 .github/worlflows/*
envlist = py{36,37,38,39,310,311},c90-py{36,37},py3-nosasltls,doc,py3-trace,pypy3
minver = 1.8
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38, doc, py3-nosasltls
3.9: py39, py3-trace
3.10: py310
3.11: py311
pypy3: pypy3
[testenv]
deps =
passenv = WITH_GCOV
# - Enable BytesWarning
# - Turn all warnings into exceptions.
setenv =
CFLAGS=-Wno-int-in-bool-context -Werror -Werror=declaration-after-statement -std=c99
commands = {envpython} -bb -Werror \
-m unittest discover -v -s Tests -p 't_*' {posargs}
[testenv:py3-nosasltls]
basepython = python3
# don't install, install dependencies manually
skip_install = true
deps =
{[testenv]deps}
pyasn1
pyasn1_modules
passenv = {[testenv]passenv}
setenv =
CI_DISABLED=LDAPI:SASL:TLS
# build and install without SASL and TLS, run without LDAPI
commands =
{envpython} setup.py clean --all
{envpython} setup.py build_ext -UHAVE_SASL,HAVE_TLS
{envpython} setup.py install --single-version-externally-managed --root=/
{[testenv]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:c90]
setenv =
CFLAGS=-Wno-int-in-bool-context -Werror -Werror=declaration-after-statement -std=c90
commands = {envpython} -Werror -c "import ldap" # we just test compilation here
[testenv:macos]
# Travis CI macOS image does not have slapd
# SDK libldap does not support ldap_init_fd
basepython = python3
deps = {[testenv]deps}
passenv = {[testenv]passenv}
setenv =
CI_DISABLED=INIT_FD
commands =
{envpython} -m unittest -v {posargs} \
Tests/t_cidict.py \
Tests/t_ldap_dn.py \
Tests/t_ldap_filter.py \
Tests/t_ldap_functions.py \
Tests/t_ldap_modlist.py \
Tests/t_ldap_schema_tokenizer.py \
Tests/t_ldapurl.py \
Tests/t_ldif.py \
Tests/t_untested_mods.py
[testenv:pypy3]
basepython = pypy3
deps = pytest
commands = {envpython} -m pytest {posargs}
[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