diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-27 03:06:40 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-09-27 03:06:40 -0400 |
commit | f84448ffea09339903e2b2273b13fb8b2fede2e9 (patch) | |
tree | d1b05e11beacd3c019efa16ff3473319fd7ab738 /lib/sqlalchemy/testing/runner.py | |
parent | 966a21c57244b07421a145770ff9cdd6df0dfc1d (diff) | |
download | sqlalchemy-f84448ffea09339903e2b2273b13fb8b2fede2e9.tar.gz |
- add a runner module
- make "default" the default dialect.
Diffstat (limited to 'lib/sqlalchemy/testing/runner.py')
-rw-r--r-- | lib/sqlalchemy/testing/runner.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/runner.py b/lib/sqlalchemy/testing/runner.py new file mode 100644 index 000000000..0a82a4744 --- /dev/null +++ b/lib/sqlalchemy/testing/runner.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +""" +Nose test runner module. + +This script is a front-end to "nosetests" which +installs SQLAlchemy's testing plugin into the local environment. + +The script is intended to be used by third-party dialects and extensions +that run within SQLAlchemy's testing framework. The runner can +be invoked via:: + + python -m sqlalchemy.testing.runner + +The script is then essentially the same as the "nosetests" script, including +all of the usual Nose options. The test environment requires that a +setup.cfg is locally present including various required options. + +Note that when using this runner, Nose's "coverage" plugin will not be +able to provide coverage for SQLAlchemy itself, since SQLAlchemy is +imported into sys.modules before coverage is started. The special +script sqla_nose.py is provided as a top-level script which loads the +plugin in a special (somewhat hacky) way so that coverage against +SQLAlchemy itself is possible. + +""" + +from sqlalchemy.testing.plugin.noseplugin import NoseSQLAlchemy + +import nose + +nose.main(addplugins=[NoseSQLAlchemy()]) |