passerelle/tox.ini

101 lines
2.5 KiB
INI

[tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/{env:RAND_TEST:}
envlist = py3-django32-codestyle-coverage
[testenv]
usedevelop = True
setenv =
DJANGO_SETTINGS_MODULE=passerelle.settings
PASSERELLE_SETTINGS_FILE=tests/settings.py
RAND_TEST={env:RAND_TEST:}
SETUPTOOLS_USE_DISTUTILS=stdlib
NUMPROCESSES={env:NUMPROCESSES:1}
fast: FAST=--nomigrations
coverage: COVERAGE=--junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=passerelle/ --cov-config .coveragerc -Wignore
deps =
django32: django>=3.2,<3.3
xmlschema<1.5
django32: psycopg2-binary
django32: django-model-utils>=4.2
pytest-cov
pytest-django
pytest-xdist
pytest!=6.0.0
WebTest
mock<4
httmock
python-dateutil
django32: django-webtest
lxml
mohawk
pytest-freezegun
pytest-localserver
pytest-sftpserver
Quixote>=3.0,<3.2
vobject
django-ratelimit<3
bleach
emoji
phonenumbers
dnspython
pyquery
requests_toolbelt
responses
zeep<3.3
codestyle: pre-commit
ldaptools
Pillow<9.5.0
jsonschema==4.10.3
python-ldap<=3.2 # align with Debian <= 11 (buster, bullseye)
cryptography<39
git+https://git.entrouvert.org/publik-django-templatetags.git
commands =
py.test {posargs: --numprocesses {env:NUMPROCESSES:1} --dist loadfile {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/}
codestyle: pre-commit run --all-files --show-diff-on-failure
[pytest]
filterwarnings = default
# to delete when using python3, it's a warning inside ElementTree
ignore:.*tree.iter().*:PendingDeprecationWarning
# pyproj warning about deprecation of '+init=authority:code which comes from using Proj(init='EPSG:4326') instead of Proj('EPSG:4326')
# I tried the new syntax but it broke some opengis tests
module:.*init.*authority.*code.*syntax is deprecated:DeprecationWarning:pyproj
[testenv:pylint]
setenv =
DJANGO_SETTINGS_MODULE=passerelle.settings
PASSERELLE_SETTINGS_FILE=tests/settings.py
SETUPTOOLS_USE_DISTUTILS=stdlib
NUMPROCESSES={env:NUMPROCESSES:6}
deps =
pytest-django
pytest!=6.0.0
WebTest
mock<4
httmock
pylint<3
astroid<3
pylint-django
django-webtest<1.9.3
pytest-freezegun
pyquery
responses
mohawk
ldaptools
git+https://git.entrouvert.org/publik-django-templatetags.git
allowlist_externals =
./pylint.sh
commands =
./pylint.sh passerelle/ tests/
[testenv:vitest]
deps = nodeenv
allowlist_externals =
bash
npx
install_command = bash setup-vitest.sh {packages}
setenv =
NODE_PATH={envdir}/lib/node_modules
LC_ALL=en_US.UTF-8
commands = npx vitest --run