summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2017-01-30 13:05:13 -0500
committerEli Collins <elic@assurancetechnologies.com>2017-01-30 13:05:13 -0500
commit13d93d9beeedbff4dca296c819116a3a103a376e (patch)
tree0c2e80a08e40ce557614d2c93802a91145f1bb50
parentc05911aaca38d8c488c4dc0c878ddeddf9ea0b2d (diff)
downloadpasslib-13d93d9beeedbff4dca296c819116a3a103a376e.tar.gz
tox.ini: updated structure to make it easier to customize
-rw-r--r--tox.ini38
1 files changed, 22 insertions, 16 deletions
diff --git a/tox.ini b/tox.ini
index 9e9df58..d3c1b03 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,9 +2,6 @@
# Passlib configuration for TOX
#===========================================================================
#
-# TODO: figure out best way to pass extra args to all nosetest calls.
-# needed for jenkins to pass "--with-xunit --xunit-file=nosetests-{envname}.xml"
-#
#-----------------------------------------------------------------------
# config options
#-----------------------------------------------------------------------
@@ -48,6 +45,7 @@ minversion=2.3
envlist =
# default tests
# TODO: would like to 'default-pyston' but doesnt quite work
+ # TODO: also add default-jython27
default-py{26,27,33,34,35,36,py,py3},
# pbkdf2 backend testing
@@ -106,29 +104,38 @@ basepython =
pypy3: pypy3
jython27: jython2.7
-setenv =
- PASSLIB_TEST_MODE = full
- bcrypthash-builtin: PASSLIB_BUILTIN_BCRYPT = enabled
- bcrypthash-disabled: PASSLIB_TEST_MODE = quick
+
passenv =
+ PASSLIB_TEST_MODE
PASSLIB_TESTS_DJANGO_SOURCE_PATH
NOSE_REDNOSE
NOSE_REDNOSE_COLOR
+
+setenv =
+ # test mode setup
+ PASSLIB_TEST_MODE = {env:PASSLIB_TEST_MODE:full}
+ bcrypthash-builtin: PASSLIB_BUILTIN_BCRYPT = enabled
+ bcrypthash-disabled: PASSLIB_TEST_MODE = quick
+
+ # nose option fragments
+ with_coverage: TEST_COVER_OPTS = --with-xunit --with-coverage --cover-xml --cover-package passlib
+ TEST_OPTS = --hide-skips --randomize {env:TEST_COVER_OPTS:}
+
changedir = {envdir}
commands =
- # default test
- default: nosetests {posargs:--hide-skips --randomize passlib.tests}
+ # default tests
+ default: nosetests {posargs:{env:TEST_OPTS} passlib.tests}
# crypto backend tests
- pbkdf2: nosetests {posargs:--hide-skips --randomize passlib.tests.test_crypto_digest passlib.tests.test_handlers_pbkdf2}
+ pbkdf2: nosetests {posargs:{env:TEST_OPTS} passlib.tests.test_crypto_digest passlib.tests.test_handlers_pbkdf2}
# hash backend tests
- bcrypthash: nosetests {posargs:--hide-skips --randomize passlib.tests.test_handlers_bcrypt}
- scrypthash: nosetests {posargs:--hide-skips --randomize passlib.tests.test_crypto_scrypt passlib.tests.test_handlers_scrypt}
- argon2hash: nosetests {posargs:--hide-skips --randomize passlib.tests.test_handlers_argon2}
+ bcrypthash: nosetests {posargs:{env:TEST_OPTS} passlib.tests.test_handlers_bcrypt}
+ scrypthash: nosetests {posargs:{env:TEST_OPTS} passlib.tests.test_crypto_scrypt passlib.tests.test_handlers_scrypt}
+ argon2hash: nosetests {posargs:{env:TEST_OPTS} passlib.tests.test_handlers_argon2}
# django tests
- django{,18}: nosetests --hide-skips {posargs:--randomize passlib.tests.test_ext_django passlib.tests.test_handlers_django}
+ django{,18}: nosetests {posargs:{env:TEST_OPTS} passlib.tests.test_ext_django passlib.tests.test_handlers_django}
deps =
# common
@@ -136,8 +143,7 @@ deps =
rednose
coverage
randomize
- py{2,26,27},pypy,jython27: unittest2
- py{3,33,34,35,36},pypy3: unittest2py3k
+ unittest2
# totp helper tests
# NOTE: cryptography requires python-dev, libffi-dev, libssl-dev