summaryrefslogtreecommitdiff
path: root/sqla_nose.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2009-08-06 21:11:27 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2009-08-06 21:11:27 +0000
commit8fc5005dfe3eb66a46470ad8a8c7b95fc4d6bdca (patch)
treeae9e27d12c9fbf8297bb90469509e1cb6a206242 /sqla_nose.py
parent7638aa7f242c6ea3d743aa9100e32be2052546a6 (diff)
downloadsqlalchemy-8fc5005dfe3eb66a46470ad8a8c7b95fc4d6bdca.tar.gz
merge 0.6 series to trunk.
Diffstat (limited to 'sqla_nose.py')
-rw-r--r--sqla_nose.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/sqla_nose.py b/sqla_nose.py
new file mode 100644
index 000000000..0542b4e5d
--- /dev/null
+++ b/sqla_nose.py
@@ -0,0 +1,22 @@
+"""
+nose runner script.
+
+Only use this script if setuptools is not available, i.e. such as
+on Python 3K. Otherwise consult README.unittests for the
+recommended methods of running tests.
+
+"""
+
+import nose
+from sqlalchemy.test.noseplugin import NoseSQLAlchemy
+from sqlalchemy.util import py3k
+
+if __name__ == '__main__':
+ if py3k:
+ # this version breaks verbose output,
+ # but is the only API that nose3 currently supports
+ nose.main(plugins=[NoseSQLAlchemy()])
+ else:
+ # this is the "correct" API
+ nose.main(addplugins=[NoseSQLAlchemy()])
+