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/
|
2019-05-10 12:42:29 +02:00
|
|
|
envlist = py27-coverage-{dj18,dj111}-authentic-{pg,sqlite}-{oldldap,},py27-coverage-{dj18,dj111}-rbac-{pg,sqlite},pylint
|
2014-11-22 06:23:50 +01:00
|
|
|
|
2016-02-12 10:46:35 +01:00
|
|
|
[testenv]
|
2016-03-02 01:13:55 +01:00
|
|
|
whitelist_externals =
|
|
|
|
/bin/mv
|
2015-09-22 22:40:36 +02:00
|
|
|
setenv =
|
2016-03-02 01:13:55 +01:00
|
|
|
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
|
2018-06-29 09:55:42 +02:00
|
|
|
BRANCH_NAME={env:BRANCH_NAME:}
|
2019-05-10 10:22:42 +02:00
|
|
|
|
2016-03-02 01:13:55 +01:00
|
|
|
authentic: DJANGO_SETTINGS_MODULE=authentic2.settings
|
|
|
|
rbac: DJANGO_SETTINGS_MODULE=django_rbac.test_settings
|
2019-05-10 10:22:42 +02:00
|
|
|
|
|
|
|
authentic: TESTS=tests/
|
|
|
|
authentic-oldldap: TESTS=tests/test_ldap.py
|
|
|
|
rbac: TESTS=tests_rbac/
|
|
|
|
|
|
|
|
sqlite: DB_ENGINE=django.db.backends.sqlite3
|
|
|
|
pg: DB_ENGINE=django.db.backends.postgresql_psycopg2
|
|
|
|
|
|
|
|
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
|
|
|
|
coverage: COVERAGE=--cov=src --cov-branch --cov-append --cov-report xml --cov-report html
|
2016-04-26 00:42:49 +02:00
|
|
|
fast: FAST=--nomigrations
|
2018-07-01 15:26:01 +02:00
|
|
|
reusedb: REUSEDB=--reuse-db
|
2019-05-10 10:22:42 +02:00
|
|
|
|
|
|
|
# support for pg_virtualenv
|
2019-03-14 20:41:42 +01:00
|
|
|
PGPORT={env:PGPORT:}
|
|
|
|
PGHOST={env:PGHOST:}
|
|
|
|
PGUSER={env:PGUSER:}
|
|
|
|
PGPASSWORD={env:PGPASSWORD:}
|
2016-03-02 01:13:55 +01:00
|
|
|
usedevelop =
|
|
|
|
coverage: True
|
|
|
|
nocoverage: False
|
|
|
|
deps =
|
2017-10-13 12:46:45 +02:00
|
|
|
pip > 9
|
2016-03-02 01:13:55 +01:00
|
|
|
dj18: django>1.8,<1.9
|
2018-08-01 15:51:58 +02:00
|
|
|
dj18: django-tables2<1.1
|
2019-03-16 17:52:24 +01:00
|
|
|
dj18: django-jsonfield<1.1
|
2018-07-17 17:21:09 +02:00
|
|
|
dj111: django<2.0
|
2018-08-01 15:51:58 +02:00
|
|
|
dj111: django-tables<2.0
|
2018-12-06 16:38:17 +01:00
|
|
|
pg: psycopg2-binary
|
2018-12-19 00:10:52 +01:00
|
|
|
dj111: psycopg2-binary
|
2015-09-22 22:40:36 +02:00
|
|
|
coverage
|
|
|
|
pytest-cov
|
2019-02-01 15:53:54 +01:00
|
|
|
pytest-django<3.4.6
|
2018-03-23 15:45:47 +01:00
|
|
|
pytest-random
|
2016-02-10 21:16:09 +01:00
|
|
|
mock
|
2019-03-06 19:28:08 +01:00
|
|
|
pytest<5
|
2015-09-22 22:40:36 +02:00
|
|
|
lxml
|
|
|
|
cssselect
|
2018-05-04 16:01:39 +02:00
|
|
|
django-webtest<1.9.3
|
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-06-16 11:50:24 +02:00
|
|
|
httmock
|
2016-11-02 16:43:52 +01:00
|
|
|
pytz
|
2018-08-03 17:12:30 +02:00
|
|
|
pytest-freezegun
|
2018-12-04 15:08:32 +01:00
|
|
|
ldaptools>=0.15
|
2019-02-13 08:17:02 +01:00
|
|
|
oldldap: python-ldap<3
|
2015-09-22 22:40:36 +02:00
|
|
|
commands =
|
2016-03-02 01:13:55 +01:00
|
|
|
./getlasso.sh
|
2019-05-10 10:22:42 +02:00
|
|
|
rbac,authentic: py.test {env:FAST:} {env:REUSEDB:} {env:COVERAGE:} {env:JUNIT:} {posargs:{env:TESTS} --random-group}
|
2018-12-07 15:03:35 +01:00
|
|
|
|
2019-05-10 12:42:29 +02:00
|
|
|
[testenv:pylint]
|
|
|
|
basepython = python2.7
|
|
|
|
deps =
|
|
|
|
pylint<1.8
|
|
|
|
pylint-django<0.8.1
|
|
|
|
commands =
|
|
|
|
/bin/bash -c "./pylint.sh src/*/"
|
|
|
|
|
2018-12-07 15:03:35 +01:00
|
|
|
[pytest]
|
|
|
|
filterwarnings =
|
|
|
|
ignore:on_delete.*
|
|
|
|
once:.*
|