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
|
[tox]
min_version = 4.0
envlist = flake8, py{39,310,311,312,313,314,314-lxml, py3}, ep{48,50}, memory, docs,
mypy-py{39,310,311,312,313,314,py3}, coverage, pytest, w3c-xsdtests
skip_missing_interpreters = true
work_dir = {tox_root}/../.tox/xmlschema
[testenv]
deps =
elementpath>=5.0.1, <6.0.0
lxml
jinja2
memory: psutil
docs: Sphinx
docs: sphinx_rtd_theme
coverage: coverage
commands =
python -m unittest
[testenv:py314]
deps =
elementpath>=5.0.1, <6.0.0
jinja2
commands =
python -m unittest
[testenv:py314-lxml]
deps =
elementpath>=5.0.1, <6.0.0
lxml
jinja2
commands =
python -m unittest
ignore_outcome = True
[testenv:ep48,ep50]
deps =
lxml
jinja2
ep48: elementpath~=4.8
ep50: elementpath~=5.0.1
[testenv:memory]
commands =
python tests/run_memory_tests.py
[testenv:docs]
commands =
make -C doc clean
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 xmlschema
flake8 tests
flake8 scripts
flake8 profiling
[testenv:mypy-py{39,310,311,312,313,314,py3}]
deps =
mypy==1.15.0
elementpath==5.0.1
lxml-stubs
jinja2
commands =
mypy --config-file {toxinidir}/pyproject.toml xmlschema
python tests/run_typing_tests.py
[testenv:coverage]
commands =
coverage erase
coverage run -a -m unittest
coverage report -m
[testenv:pytest]
deps =
pytest
pytest-randomly
elementpath>=5.0.1, <6.0.0
lxml
jinja2
mypy==1.15.0
lxml-stubs
commands =
pytest tests -ra
[testenv:w3c-xsdtests]
description = Run W3C XSD 1.0/1.1 tests
platform = (linux|darwin)
set_env =
COMMIT = 4293d6fb026af778aa7ad381c2a310354578cbe3
CHECKSUM = 3c7a44dbb59553d09ba96fee898255be78966960c22e9a7886c0b426a03255d7
change_dir = {env_tmp_dir}
deps =
lxml
commands =
mkdir -p xmlschema-tmp/tests
cp -p {tox_root}/tests/run_w3c_tests.py xmlschema-tmp/tests/
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-tmp/tests/run_w3c_tests.py --xml
allowlist_externals =
bash
curl
cp
grep
tar
mkdir
sha256sum
[testenv:build]
deps =
build
commands =
python -m build
|