3
Nose test runner module.
5
This script is a front-end to "nosetests" which
6
installs SQLAlchemy's testing plugin into the local environment.
8
The script is intended to be used by third-party dialects and extensions
9
that run within SQLAlchemy's testing framework. The runner can
12
python -m sqlalchemy.testing.runner
14
The script is then essentially the same as the "nosetests" script, including
15
all of the usual Nose options. The test environment requires that a
16
setup.cfg is locally present including various required options.
18
Note that when using this runner, Nose's "coverage" plugin will not be
19
able to provide coverage for SQLAlchemy itself, since SQLAlchemy is
20
imported into sys.modules before coverage is started. The special
21
script sqla_nose.py is provided as a top-level script which loads the
22
plugin in a special (somewhat hacky) way so that coverage against
23
SQLAlchemy itself is possible.
27
from sqlalchemy.testing.plugin.noseplugin import NoseSQLAlchemy
33
nose.main(addplugins=[NoseSQLAlchemy()])
36
"""Runner to use for the 'test_suite' entry of your setup.py.
38
Prevents any name clash shenanigans from the command line
39
argument "test" that the "setup.py test" command sends
43
nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner'])