2014-11-22 06:23:50 +01:00
|
|
|
# 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]
|
2019-03-14 20:40:20 +01:00
|
|
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/
|
2020-04-22 14:46:01 +02:00
|
|
|
envlist =
|
2022-12-08 11:25:31 +01:00
|
|
|
update-locales
|
2022-06-22 18:43:15 +02:00
|
|
|
py3
|
2023-10-04 15:30:07 +02:00
|
|
|
py3-oldstable
|
2023-10-04 15:34:52 +02:00
|
|
|
py3-stable
|
2021-08-06 12:52:44 +02:00
|
|
|
check-migrations
|
|
|
|
code-style
|
|
|
|
pylint
|
2022-12-08 11:25:31 +01:00
|
|
|
labels =
|
2023-10-04 15:30:07 +02:00
|
|
|
jenkins = update-locales,py3-oldstable,check-migrations,code-style,pylint
|
2014-11-22 06:23:50 +01:00
|
|
|
|
2016-02-12 10:46:35 +01:00
|
|
|
[testenv]
|
2015-09-22 22:40:36 +02:00
|
|
|
setenv =
|
2020-04-22 14:46:01 +02:00
|
|
|
|
2022-07-05 18:37:15 +02:00
|
|
|
NUMPROCESSES={env:NUMPROCESSES:1}
|
|
|
|
|
2022-10-04 15:48:05 +02:00
|
|
|
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
|
|
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
2019-05-10 10:22:42 +02:00
|
|
|
|
2022-10-04 15:48:05 +02:00
|
|
|
TESTS=tests/
|
2019-05-10 10:22:42 +02:00
|
|
|
|
2020-04-22 14:46:01 +02:00
|
|
|
DB_ENGINE=django.db.backends.postgresql_psycopg2
|
2020-09-01 14:20:00 +02:00
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
2019-05-10 10:22:42 +02:00
|
|
|
|
|
|
|
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
|
2023-11-30 14:42:29 +01:00
|
|
|
COVERAGE={tty::--cov --cov-append --cov-report xml --cov-report html --cov-context=test --cov-config=tox.ini}
|
2016-04-26 00:42:49 +02:00
|
|
|
fast: FAST=--nomigrations
|
2018-07-01 15:26:01 +02:00
|
|
|
reusedb: REUSEDB=--reuse-db
|
2020-04-22 14:46:01 +02:00
|
|
|
passenv=
|
|
|
|
BRANCH_NAME
|
2019-05-10 10:22:42 +02:00
|
|
|
# support for pg_virtualenv
|
2020-04-22 14:46:01 +02:00
|
|
|
PGPORT
|
|
|
|
PGHOST
|
|
|
|
PGUSER
|
|
|
|
PGPASSWORD
|
2022-10-12 14:01:04 +02:00
|
|
|
# to customize pytest running in your locale environment, ex.:
|
|
|
|
# export PYTESTOPTIONS=--sw
|
2020-10-01 11:49:10 +02:00
|
|
|
PYTESTOPTIONS
|
2016-03-02 01:13:55 +01:00
|
|
|
deps =
|
2017-10-13 12:46:45 +02:00
|
|
|
pip > 9
|
2023-10-04 15:30:07 +02:00
|
|
|
stable: django>=3.2.12,<3.3
|
|
|
|
stable: django-model-utils>=4.2,<4.3
|
|
|
|
stable: django-select2>=7.7,<7.8
|
|
|
|
stable: django-tables2==2.4.1
|
2023-10-04 17:20:19 +02:00
|
|
|
stable: django-import-export>=3.0,<3.1
|
|
|
|
oldstable: django-import-export>=2.5,<2.6
|
2022-04-25 15:47:13 +02:00
|
|
|
psycopg2-binary
|
2015-09-22 22:40:36 +02:00
|
|
|
coverage
|
|
|
|
pytest-cov
|
2020-09-28 15:04:45 +02:00
|
|
|
pytest-django
|
2018-03-23 15:45:47 +01:00
|
|
|
pytest-random
|
2022-07-05 18:37:15 +02:00
|
|
|
pytest-xdist
|
2020-10-06 09:29:44 +02:00
|
|
|
mock<4
|
2020-09-28 15:04:45 +02:00
|
|
|
pytest!=5.3.3
|
2015-09-22 22:40:36 +02:00
|
|
|
lxml
|
|
|
|
cssselect
|
2020-06-20 16:28:26 +02:00
|
|
|
django-webtest
|
2018-09-23 08:58:39 +02:00
|
|
|
Markdown<3
|
2015-11-10 10:32:00 +01:00
|
|
|
WebTest
|
2015-12-14 14:45:59 +01:00
|
|
|
pyquery
|
2016-11-02 16:43:52 +01:00
|
|
|
pytz
|
2018-08-03 17:12:30 +02:00
|
|
|
pytest-freezegun
|
2020-10-01 11:49:10 +02:00
|
|
|
faker
|
2021-09-20 15:31:43 +02:00
|
|
|
uwsgidecorators
|
2020-02-22 10:14:27 +01:00
|
|
|
enum34<=1.1.6
|
2022-04-22 12:44:02 +02:00
|
|
|
ldaptools>=0.24
|
2022-10-04 15:48:05 +02:00
|
|
|
numpy
|
2022-06-22 18:36:22 +02:00
|
|
|
django-filter
|
2023-07-19 14:35:27 +02:00
|
|
|
responses
|
2023-10-04 15:49:53 +02:00
|
|
|
stable: djangorestframework>=3.14,<3.15
|
|
|
|
oldstable: djangorestframework>=3.12,<3.13
|
2023-10-04 15:34:52 +02:00
|
|
|
stable: jwcrypto>=1.1,<1.3
|
|
|
|
oldstable: jwcrypto<0.9
|
2020-09-25 18:34:15 +02:00
|
|
|
usedevelop = True
|
2022-12-08 11:25:31 +01:00
|
|
|
allowlist_externals =
|
|
|
|
./getlasso3.sh
|
2015-09-22 22:40:36 +02:00
|
|
|
commands =
|
2021-08-06 12:52:44 +02:00
|
|
|
./getlasso3.sh
|
2022-10-04 15:48:05 +02:00
|
|
|
py.test {env:PYTESTOPTIONS:} {env:FAST:} {env:REUSEDB:} {env:COVERAGE:} {env:JUNIT:} {env:SW:} {posargs:{env:TESTS} --numprocesses {env:NUMPROCESSES:1} --random-group}
|
2018-12-07 15:03:35 +01:00
|
|
|
|
2021-08-06 12:52:44 +02:00
|
|
|
[testenv:check-migrations]
|
|
|
|
basepython = python3
|
|
|
|
usedevelop = True
|
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
|
|
|
deps =
|
2023-11-23 19:12:21 +01:00
|
|
|
psycopg2-binary
|
2022-12-08 11:25:31 +01:00
|
|
|
allowlist_externals =
|
|
|
|
./getlasso3.sh
|
|
|
|
./check-migrations.sh
|
2021-08-06 12:52:44 +02:00
|
|
|
commands =
|
|
|
|
./getlasso3.sh
|
|
|
|
./check-migrations.sh
|
|
|
|
|
2019-05-10 12:42:29 +02:00
|
|
|
[testenv:pylint]
|
2021-03-31 23:31:27 +02:00
|
|
|
basepython = python3
|
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
2022-07-06 17:21:28 +02:00
|
|
|
NUMPROCESSES={env:NUMPROCESSES:1}
|
2019-05-10 12:42:29 +02:00
|
|
|
deps =
|
2023-11-28 11:25:01 +01:00
|
|
|
pylint
|
|
|
|
astroid
|
2021-03-31 23:31:27 +02:00
|
|
|
pylint-django
|
2023-10-04 11:41:37 +02:00
|
|
|
psycopg2-binary
|
2021-09-16 16:45:27 +02:00
|
|
|
django_webtest
|
|
|
|
faker
|
|
|
|
lxml
|
|
|
|
ldaptools
|
|
|
|
pytest
|
|
|
|
uwsgidecorators
|
|
|
|
pyquery
|
2022-10-04 16:21:16 +02:00
|
|
|
numpy
|
2023-07-19 14:35:27 +02:00
|
|
|
responses
|
2022-12-08 11:25:31 +01:00
|
|
|
allowlist_externals =
|
|
|
|
./getlasso3.sh
|
|
|
|
./pylint.sh
|
2019-05-10 12:42:29 +02:00
|
|
|
commands =
|
2021-03-31 23:31:27 +02:00
|
|
|
./getlasso3.sh
|
2022-11-24 12:20:57 +01:00
|
|
|
./pylint.sh {posargs:tests/ src/}
|
2019-05-10 12:42:29 +02:00
|
|
|
|
2020-04-16 14:34:00 +02:00
|
|
|
[testenv:manage]
|
|
|
|
usedevelop = True
|
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
|
|
AUTHENTIC2_SETTINGS_FILE=local_settings.py
|
|
|
|
deps =
|
2023-11-23 19:12:21 +01:00
|
|
|
psycopg2-binary
|
2020-04-16 14:34:00 +02:00
|
|
|
django-debug-toolbar
|
|
|
|
ipython
|
|
|
|
ipdb
|
2022-12-08 11:25:31 +01:00
|
|
|
allowlist_externals =
|
|
|
|
./getlasso3.sh
|
|
|
|
./manage.py
|
2020-04-16 14:34:00 +02:00
|
|
|
commands =
|
|
|
|
./getlasso3.sh
|
2022-10-12 12:05:49 +02:00
|
|
|
./manage.py {posargs:--help}
|
2020-04-16 14:34:00 +02:00
|
|
|
|
2021-07-30 14:10:30 +02:00
|
|
|
|
|
|
|
[testenv:update-locales]
|
|
|
|
usedevelop = True
|
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
|
|
deps =
|
2023-10-12 18:13:29 +02:00
|
|
|
psycopg2-binary
|
2022-12-08 11:25:31 +01:00
|
|
|
allowlist_externals =
|
|
|
|
./getlasso3.sh
|
|
|
|
./manage.py
|
2021-07-30 14:10:30 +02:00
|
|
|
commands =
|
|
|
|
./getlasso3.sh
|
2022-11-22 11:37:31 +01:00
|
|
|
./manage.py makemessages -l fr -i tests
|
2022-10-12 12:05:49 +02:00
|
|
|
./manage.py compilemessages
|
2021-07-30 14:10:30 +02:00
|
|
|
|
|
|
|
|
2021-03-30 10:10:04 +02:00
|
|
|
[testenv:code-style]
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
pre-commit
|
|
|
|
commands =
|
2021-07-12 11:59:31 +02:00
|
|
|
pre-commit run --all-files --show-diff-on-failure
|
2021-03-30 10:10:04 +02:00
|
|
|
|
2018-12-07 15:03:35 +01:00
|
|
|
[pytest]
|
|
|
|
filterwarnings =
|
2020-12-03 09:52:08 +01:00
|
|
|
ignore
|
|
|
|
once:::authentic2.*
|
2022-10-25 07:44:12 +02:00
|
|
|
error:.*please use dns.resolver.resolve:DeprecationWarning:
|
2022-10-25 07:35:30 +02:00
|
|
|
error:.*Passing None for the middleware get_response argument is deprecated.*::
|
2022-10-25 07:57:48 +02:00
|
|
|
error:.*ANTIALIAS is deprecated and will be removed in Pillow 10::
|
2022-12-01 08:56:26 +01:00
|
|
|
error:.*LANCZOS.*Pillow 10::
|
2020-04-22 14:46:01 +02:00
|
|
|
junit_family=xunit2
|
2020-08-28 09:27:41 +02:00
|
|
|
|
|
|
|
[coverage:run]
|
|
|
|
source =
|
2024-01-15 15:00:02 +01:00
|
|
|
src
|
2024-01-15 11:43:20 +01:00
|
|
|
tests
|
2020-09-25 18:34:15 +02:00
|
|
|
branch = True
|
2022-01-11 15:57:21 +01:00
|
|
|
|
|
|
|
[coverage:html]
|
2022-01-30 19:58:57 +01:00
|
|
|
show_contexts = True
|