#=========================================================================== # 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 #===========================================================================