authentic/tox.ini

75 lines
2.2 KiB
INI

# 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]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/{env:BRANCH_NAME:}
envlist = py27-coverage-{dj18,dj111}-authentic-{pg,sqlite}-{oldldap,},py27-coverage-{dj18,dj111}-rbac-{pg,sqlite}
[testenv]
# django.contrib.auth is not tested it does not work with our templates
whitelist_externals =
/bin/mv
setenv =
AUTHENTIC2_SETTINGS_FILE=tests/settings.py
BRANCH_NAME={env:BRANCH_NAME:}
sqlite: DB_ENGINE=django.db.backends.sqlite3
pg: DB_ENGINE=django.db.backends.postgresql_psycopg2
coverage: COVERAGE=--junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=src/ --cov-config .coveragerc
authentic: DJANGO_SETTINGS_MODULE=authentic2.settings
rbac: DJANGO_SETTINGS_MODULE=django_rbac.test_settings
fast: FAST=--nomigrations
reusedb: REUSEDB=--reuse-db
A2_TESTS=tests
oldldap: A2_TESTS=tests/test_ldap.py
usedevelop =
coverage: True
nocoverage: False
deps =
pip > 9
dj18: django>1.8,<1.9
dj18: django-tables2<1.1
dj111: django<2.0
dj111: django-tables<2.0
pg: psycopg2-binary
dj111: psycopg2-binary
coverage
pytest-cov
pytest-django<3.4.6
pytest-random
mock
pytest>=3.3.0
lxml
cssselect
pylint<1.8
pylint-django<0.8.1
django-webtest<1.9.3
Markdown<3
WebTest
pyquery
httmock
pytz
pytest-freezegun
ldaptools>=0.15
oldldap: python-ldap<3
commands =
./getlasso.sh
authentic: py.test {env:FAST:} {env:REUSEDB:} {env:COVERAGE:} {posargs:{env:A2_TESTS:tests/} --random}
rbac: py.test {env:FAST:} {env:REUSEDB:} {env:COVERAGE:} {posargs:tests_rbac/}
coverage: mv coverage.xml coverage-{envname}.xml
coverage-dj18-authentic-pg: mv htmlcov htmlcov-coverage-dj18-authentic-pg
coverage-dj18-rbac-pg: mv htmlcov htmlcov-coverage-dj18-rbac-pg
coverage-dj18-authentic-pg: ./pylint.sh src/authentic2/
[testenv:check]
deps = prospector[with_pyroma]
commands = python -m compileall -fq {toxinidir}/src
prospector --with-tool pyroma {toxinidir}/src
[pytest]
filterwarnings =
ignore:on_delete.*
once:.*