summaryrefslogtreecommitdiffstats
path: root/tox.ini
blob: 29f0921edffca8ae59a6acc81759cff0f8e5439b (plain)
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
# 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/
envlist = py27-coverage-dj111-authentic-pg-{oldldap,},py27-coverage-dj111-rbac-pg,pylint

[testenv]
whitelist_externals =
  /bin/mv
setenv =
  AUTHENTIC2_SETTINGS_FILE=tests/settings.py
  BRANCH_NAME={env:BRANCH_NAME:}

  authentic: DJANGO_SETTINGS_MODULE=authentic2.settings
  rbac: DJANGO_SETTINGS_MODULE=django_rbac.test_settings

  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
  fast: FAST=--nomigrations
  reusedb: REUSEDB=--reuse-db

  # support for pg_virtualenv
  PGPORT={env:PGPORT:}
  PGHOST={env:PGHOST:}
  PGUSER={env:PGUSER:}
  PGPASSWORD={env:PGPASSWORD:}
usedevelop =
  coverage: True
  nocoverage: False
deps = 
  pip > 9
  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<5
  lxml
  cssselect
  django-webtest<1.9.3
  Markdown<3
  WebTest
  pyquery
  httmock
  pytz
  pytest-freezegun
  ldaptools>=0.15
  oldldap: python-ldap<3
commands =
  ./getlasso.sh
  rbac,authentic: py.test {env:FAST:} {env:REUSEDB:} {env:COVERAGE:} {env:JUNIT:} {posargs:{env:TESTS} --random-group}

[testenv:pylint]
basepython = python2.7
deps =
    pylint<1.8
    pylint-django<0.8.1
commands =
    /bin/bash -c "./pylint.sh src/*/"

[pytest]
filterwarnings =
 ignore:on_delete.*
 once:.*