summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-04-17 22:48:10 -0400
committerEli Collins <elic@assurancetechnologies.com>2012-04-17 22:48:10 -0400
commit5e880d9a938f11bc1e6d29b6e4e7eb42190fdd6d (patch)
tree8d486fc83359de52afb53668f20402369d4c3eb1
parente81b32667429c6486a63f4a2c2bf446ba2c8ea90 (diff)
downloadpasslib-5e880d9a938f11bc1e6d29b6e4e7eb42190fdd6d.tar.gz
updated tox config, moved GAE helper into tests module to silence tox warning
-rw-r--r--.hgignore2
-rw-r--r--admin/gae-test-app.yaml9
-rw-r--r--passlib/tests/tox_support.py37
-rw-r--r--tox.ini82
4 files changed, 99 insertions, 31 deletions
diff --git a/.hgignore b/.hgignore
index 7e3cc34..157710f 100644
--- a/.hgignore
+++ b/.hgignore
@@ -1,4 +1,3 @@
-glob:docs/_build
glob:*.pyc
glob:*.egg-info
glob:.coverage
@@ -8,3 +7,4 @@ glob:dist
glob:*$py.class
glob:MANIFEST
glob:.tox
+glob:app.yaml
diff --git a/admin/gae-test-app.yaml b/admin/gae-test-app.yaml
deleted file mode 100644
index c846c23..0000000
--- a/admin/gae-test-app.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-application: fake-app
-version: 2
-runtime: python
-api_version: 1
-
-handlers:
-- url: /.*
- script: dummy.py
-
diff --git a/passlib/tests/tox_support.py b/passlib/tests/tox_support.py
new file mode 100644
index 0000000..7da0546
--- /dev/null
+++ b/passlib/tests/tox_support.py
@@ -0,0 +1,37 @@
+"""passlib.tests.tox_support - helper script for tox tests"""
+#=============================================================================
+# imports
+#=============================================================================
+# core
+import os
+import logging; log = logging.getLogger(__name__)
+# site
+# pkg
+# local
+__all__ = [
+]
+
+#=============================================================================
+# main
+#=============================================================================
+def main(path, runtime):
+ "write fake GAE ``app.yaml`` to current directory so nosegae will work"
+ from passlib.tests.utils import set_file
+ set_file(os.path.join(path, "app.yaml"), """\
+application: fake-app
+version: 2
+runtime: %s
+api_version: 1
+
+handlers:
+- url: /.*
+ script: dummy.py
+""" % runtime)
+
+if __name__ == "__main__":
+ import sys
+ sys.exit(main(*sys.argv[1:]) or 0)
+
+#=============================================================================
+# eof
+#=============================================================================
diff --git a/tox.ini b/tox.ini
index 1490ea0..ea8e2bb 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,52 +1,92 @@
[tox]
-envlist = py27,py32,py25,py26,py31,pypy15,pypy16,jython,gae
+envlist = py27,py32,py25,py26,py31,pypy15,pypy16,pypy17,jython,gae25,gae27
+#===========================================================================
+# stock CPython VMs
+#===========================================================================
[testenv]
-setenv =
+setenv =
PASSLIB_TESTS = all
+ PASSLIB_TESTS_FUZZ_TIME = 20
changedir = {envdir}
-commands =
+commands =
nosetests passlib.tests
-
deps =
nose
unittest2
[testenv:py27]
-deps =
+deps =
nose
unittest2
py-bcrypt
bcryptor
[testenv:py31]
-deps =
- nose
- unittest2py3k
+deps =
+ nose
+ unittest2py3k
[testenv:py32]
-deps =
- nose
- unittest2py3k
+deps =
+ nose
+ unittest2py3k
+#===========================================================================
+# PyPy VM - all target Python 2.7
+#===========================================================================
[testenv:pypy15]
basepython = pypy1.5
[testenv:pypy16]
basepython = pypy1.6
-[testenv:gae]
-# NOTE: annoyingly, have to use --without-sandbox
-# or else nose / nosegae / GAE / virtualenv don't play nice.
-# need to figure out what's the matter, and submit a patch.
-# might just have to write a python script that sets everything
-# up and runs nose manually
+[testenv:pypy17]
+basepython = pypy1.7
+setenv =
+ PASSLIB_TESTS = all
+ PASSLIB_TESTS_FUZZ_TIME = 20
+ PASSLIB_BUILTIN_BCRYPT = enable # only place this isn't punitively slow
+
+#===========================================================================
+# Jython - no special directives, currently same as py25
+#===========================================================================
+
+#===========================================================================
+# Google App Engine
+#===========================================================================
+[testenv:gae25]
basepython = python2.5
-deps =
+deps =
nose
- nosegae
+ # FIXME: getting all kinds of errors when using nosegae 0.2.0 :(
+ nosegae==0.1.9
unittest2
changedir = {envdir}/lib/python2.5/site-packages
commands =
- cp {toxinidir}/admin/gae-test-app.yaml app.yaml
- nosetests --with-gae --without-sandbox passlib/tests
+ # setup custom app.yaml so GAE can run
+ python -m passlib.tests.tox_support . python
+
+ # have to run without sandbox for now, something in nose+GAE+virtualenv
+ # won't play nice with eachother.
+ nosetests --with-gae --without-sandbox passlib/tests
+
+[testenv:gae27]
+basepython = python2.7
+deps =
+ nose
+ # FIXME: getting all kinds of errors when using nosegae 0.2.0 :(
+ 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 . python27
+
+ # have to run without sandbox for now, something in nose/GAE/virtualenv
+ # won't play nice with eachother.
+ nosetests --with-gae --without-sandbox passlib/tests
+
+#===========================================================================
+# EOF
+#===========================================================================