File: tox.ini

package info (click to toggle)
elementpath 5.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,452 kB
  • sloc: python: 36,482; xml: 40; makefile: 13
file content (167 lines) | stat: -rw-r--r-- 4,253 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# 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]
min_version = 4.0
envlist =
    py{310,311,312,313,314,314,315,315-lxml,py3}, docs, flake8,
    mypy-py{310,311,312,313,314,315,py3}, pytest, coverage,
    xmlschema{401,410}, w3c-xsdtests, w3c-qt3tests
skip_missing_interpreters = true
work_dir = {tox_root}/../.tox/elementpath

[testenv]
deps =
    lxml
    xmlschema~=4.2.0
    docs: sphinx
    coverage: coverage
set_env =
    py313: TEST_UNICODE_INSTALLATION = 6.2.0
commands = python -m unittest

[testenv:py315]
deps =
    xmlschema~=4.2.0
commands =
    python -m unittest

[testenv:py315-lxml]
deps =
    lxml
    xmlschema~=4.2.0
commands =
    python -m unittest
ignore_outcome = True

[testenv:docs]
commands =
    make -C doc html SPHINXOPTS="-W -n"
    make -C doc latexpdf SPHINXOPTS="-W -n"
    make -C doc doctest SPHINXOPTS="-W -n"
    sphinx-build -W -n -T -b man doc build/sphinx/man
allowlist_externals = make

[flake8]
max-line-length = 100

[testenv:flake8]
deps =
    flake8
commands =
    flake8 elementpath
    flake8 tests

[testenv:mypy-py{310,311,312,313,314,315,py3}]
deps =
    mypy==1.19.1; platform_python_implementation != 'PyPy'
    mypy==1.18.2; platform_python_implementation == 'PyPy'
    xmlschema~=4.2.0
    lxml-stubs
commands =
    mypy --version
    mypy --strict elementpath
    python tests/run_typing_tests.py

[testenv:coverage]
commands =
    coverage run -p -m unittest
    coverage combine
    coverage report -m

[testenv:pytest]
deps =
    pytest
    pytest-randomly
    lxml
    xmlschema~=4.2.0
commands =
    pytest tests -ra

[testenv:xmlschema{401,410,420}]
description = Run xmlschema tests and mypy on xmlschema source (>=3.1.0)
platform = (linux|darwin)
set_env =
    xmlschema401: VERSION = 4.0.1
    xmlschema410: VERSION = 4.1.0
    xmlschema420: VERSION = 4.2.0
change_dir = {env_tmp_dir}
deps =
    mypy==1.19.1
    lxml
    lxml-stubs
    jinja2
    xmlschema=={env:VERSION}
commands =
    pip download xmlschema=={env:VERSION} --no-deps --no-binary xmlschema
    tar xzf xmlschema-{env:VERSION}.tar.gz --strip-components=1
    python tests/run_all_tests.py
allowlist_externals =
    bash
    sed
    tar
ignore_outcome = True

[testenv:w3c-xsdtests]
description = Run W3C XSD 1.0/1.1 tests using xmlschema==4.2.0
platform = (linux|darwin)
set_env =
    VERSION = 4.2.0
    COMMIT = 4293d6fb026af778aa7ad381c2a310354578cbe3
    CHECKSUM = 3c7a44dbb59553d09ba96fee898255be78966960c22e9a7886c0b426a03255d7
change_dir = {env_tmp_dir}
deps =
    lxml
    xmlschema=={env:VERSION}
commands =
    pip download xmlschema=={env:VERSION} --no-deps --no-binary xmlschema
    tar xzf xmlschema-{env:VERSION}.tar.gz
    curl -L -o w3c-xsdtests.tar.gz https://github.com/w3c/xsdtests/tarball/{env:COMMIT}
    bash -c "sha256sum w3c-xsdtests.tar.gz | grep {env:CHECKSUM}"
    mkdir xsdtests
    tar xzf w3c-xsdtests.tar.gz -C xsdtests --strip-components=1
    python xmlschema-{env:VERSION}/tests/run_w3c_tests.py --xml
allowlist_externals =
    bash
    curl
    grep
    tar
    mkdir
    sha256sum
ignore_outcome = True

[testenv:w3c-qt3tests]
description = Run W3C XQuery/XPath 2.0/3.0 tests
set_env =
    COMMIT = b6584bdb888687348a46d5d596d70e326008e236
    CHECKSUM = 7833656eaf81394b47e8dd7a4a6ee537e7f58fc7d7dc3f4795532d09f7432462
change_dir = {env_tmp_dir}
deps =
    lxml
    xmlschema~=4.2.0
commands =
    mkdir -p elementpath-tmp/tests
    cp -p {tox_root}/tests/run_w3c_tests.py elementpath-tmp/tests/
    curl -L -o w3c-qt3tests.tar.gz https://github.com/w3c/qt3tests/tarball/{env:COMMIT}
    bash -c "sha256sum w3c-qt3tests.tar.gz | grep {env:CHECKSUM}"
    mkdir qt3tests
    tar xzf w3c-qt3tests.tar.gz -C qt3tests --strip-components=1
    python elementpath-tmp/tests/run_w3c_tests.py --catalog ./qt3tests/catalog.xml
    python elementpath-tmp/tests/run_w3c_tests.py --catalog ./qt3tests/catalog.xml --xp30
allowlist_externals =
    bash
    curl
    cp
    grep
    tar
    mkdir
    sha256sum
ignore_outcome = True

[testenv:build]
deps =
    build
commands =
    python -m build