#=========================================================================== # 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) # # environments not in default list # py25 - running tests separately, no longer supported by # tox/setuptools/pip without lots of effort # jython25 - same as py25 # jython27 - not testable even outside of tox: easy_install etc don't work, # primarily due to http://bugs.jython.org/issue2066 # and probably http://bugs.jython.org/issue2016 as well. # gae25 - no longer supported by gae sdk, and would be same as py25 otherwise #=========================================================================== #=========================================================================== # global config #=========================================================================== [tox] minversion=1.4 envlist = py27,py33,py26,py31,py32,pypy,pypy3,py-bcrypt,py-bcrypt-py3,django12,django13,django14,django15,django,django-py3,gae27 #=========================================================================== # stock CPython VMs #=========================================================================== [testenv] setenv = PASSLIB_TEST_MODE = full changedir = {envdir} commands = nosetests {posargs:passlib.tests} deps = nose coverage unittest2 [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] # NOTE: getting this to work under pip-1.4.1 requires hacking in fix # to deal with https://github.com/pypa/pip/issues/1105 # into virtualenv_support package. 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 = django<1.3 {[testenv]deps} commands = nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} [testenv:django13] deps = django<1.4 {[testenv]deps} commands = nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} [testenv:django14] deps = django<1.5 bcrypt {[testenv]deps} commands = nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} [testenv:django15] deps = django<1.6 py-bcrypt {[testenv]deps} commands = nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} [testenv:django] # NOTE: including bcrypt so django bcrypt hasher is included deps = django bcrypt {[testenv]deps} commands = nosetests {posargs:passlib.tests.test_ext_django passlib.tests.test_handlers_django} [testenv:django-py3] # NOTE: including bcrypt so django bcrypt hasher is included basepython = python3 deps = django bcrypt {[testenv:py32]deps} 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 deps = bcrypt {[testenv]deps} [testenv:pypy3] # pypy3 (as of v2.1b1) targets Python 3.2 basepython = pypy3 deps = bcrypt {[testenv:py32]deps} #=========================================================================== # Jython VM #=========================================================================== [testenv:jython27] basepython = jython2.7 #=========================================================================== # Google App Engine integration # NOTE: for this to work, the GAE SDK should be installed in # /usr/local/google_appengine, or set nosegae's --gae-lib-root #=========================================================================== [testenv:gae27] basepython = python2.7 deps = nose nosegae 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 # 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 #===========================================================================