summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 10e254ea95c90433579397a79c080ffd6f6479e0 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#===========================================================================
# Passlib configuration for TOX
# =============================
#
# PASSLIB_TEST_MODE:
#
#    "quick"
#        run the bare minimum tests to ensure functionality.
#        variable-cost hashes are tested at their lowest setting.
#        hash algorithms are only tested against the backend that will
#        be used on the current host. no fuzz testing is done.
#
#    "default"
#        same as ``"quick"``, except: hash algorithms are tested
#        at default levels, and a brief round of fuzz testing is done
#        for each hash.
#
#    "full"
#        extra regression and internal tests are enabled, hash algorithms are tested
#        against all available backends, unavailable ones are mocked whre possible,
#        additional time is devoted to fuzz testing.
#
# testing of m2crypto integration - done in py27 test
#
# testing of django integration - split across various cpython tests:
#  py27,py33 - tests latest django
#  djangoXX - tests specific django versions
#
# testing of bcrypt backends - split across various cpython tests:
#  py27 - tests bcrypt & bcryptor (so they can be cross-checked)
#  py33 - tests bcrypt
#  py-bcrypt - tests py-bcrypt & bcryptor (so they can be cross-checked)
#===========================================================================

#===========================================================================
# global config
#===========================================================================
[tox]
minversion=1.4
envlist = py27,py33,py25,py26,py31,py32,pypy,pypy3,py-bcrypt,py-bcrypt-py3,django12,django13,django14,django15,jython,gae25,gae27

#===========================================================================
# stock CPython VMs
#===========================================================================
[testenv]
setenv =
    PASSLIB_TEST_MODE = full
changedir = {envdir}
commands =
    nosetests {posargs:passlib.tests}
deps =
    nose
    coverage
    unittest2

[testenv:py25]
# NOTE: unittest2 omitted, to test unittest backport code
deps =
    nose
    coverage

[testenv:py27]
# NOTE: M2Crypto requires swig & libssl-dev,
#       a number of packages required C compiler & python-dev
# NOTE: bcryptor requires Cython
deps =
    nose
    coverage
    unittest2
    bcrypt
    bcryptor
    django
    M2Crypto

[testenv:py31]
deps =
    nose
    unittest2py3k

[testenv:py32]
deps =
    nose
    unittest2py3k

[testenv:py33]
deps =
    nose
    coverage
    unittest2py3k
    django
    bcrypt

#===========================================================================
# bcrypt library-specific testing
#===========================================================================
[testenv:py-bcrypt]
deps =
    bcryptor
    py-bcrypt
    {[testenv]deps}
commands =
    nosetests {posargs:passlib.tests.test_handlers_bcrypt}

[testenv:py-bcrypt-py3]
basepython = python3
deps =
#    bcryptor -- has py3 installation issues
    py-bcrypt
    {[testenv:py32]deps}
commands =
    nosetests {posargs:passlib.tests.test_handlers_bcrypt}

#===========================================================================
# django version-specific testing
#===========================================================================
[testenv:django12]
deps =
    nose
    unittest2
    django<1.3
commands =
    nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django}

[testenv:django13]
deps =
    nose
    unittest2
    django<1.4
commands =
    nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django}

[testenv:django14]
deps =
    nose
    unittest2
    django<1.5
commands =
    nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django}

[testenv:django15]
deps =
    nose
    unittest2
    django<1.6
commands =
    nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django}

[testenv:django]
deps =
    nose
    unittest2
    django
commands =
    nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django}

[testenv:django-py3]
basepython = python3
deps =
    nose
    unittest2py3k
    django
commands =
    nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django}

#===========================================================================
# PyPy VM - all releases currently target Python 2.7
#===========================================================================
[testenv:pypy]
# pypy (as of v1.6 - v2.2) targets Python 2.7
basepython = pypy

[testenv:pypy3]
# pypy3 (as of v2.1b1) targets Python 3.2
basepython = pypy3

#===========================================================================
# Jython - no special directives, currently same as py25
#===========================================================================

#===========================================================================
# Google App Engine integration
#===========================================================================

[testenv:gae25]
# NOTE: google is deprecating py25 support, per
#       https://developers.google.com/appengine/docs/python/python25/diff27
#       and so this test can probably be removed sometime after 2014-01-01
basepython = python2.5
deps =
    # FIXME: getting all kinds of errors when using nosegae 0.2.0 :(
    nose
    nosegae==0.1.9
    unittest2
changedir = {envdir}/lib/python2.5/site-packages
commands =
    # setup custom app.yaml so GAE can run
    python -m passlib.tests.tox_support setup_gae . python

    # FIXME: have to run using --without-sandbox for now,
    # something in nose+GAE+virtualenv won't play nice with eachother.
    nosetests --with-gae --without-sandbox {posargs:passlib/tests}

[testenv:gae27]
basepython = python2.7
deps =
    # FIXME: getting all kinds of errors when using nosegae 0.2.0 :(
    nose
    nosegae==0.1.9
    unittest2
changedir = {envdir}/lib/python2.7/site-packages
commands =
    # setup custom app.yaml so GAE can run
    python -m passlib.tests.tox_support setup_gae . python27

    # TODO: figure out how to select django 1.2 so the extension under gae.

    # FIXME: have to run using --without-sandbox for now,
    # something in nose+GAE+virtualenv won't play nice with eachother.
    nosetests --with-gae --without-sandbox {posargs:passlib/tests}

#===========================================================================
# eof
#===========================================================================