summaryrefslogtreecommitdiff
path: root/sqla_nose.py
blob: c8ebaf34f09a48bbc4d92a47fee73b78f2c88fcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python
"""
nose runner script.

This script is a front-end to "nosetests" which
installs SQLAlchemy's testing plugin into the local environment.

"""
import sys
import imp
import nose
import warnings

warnings.warn(
    "SQLAlchemy now includes py.test support which going forward should be "
    "preferred to nose.  Please see README.unittests.rst for updated "
    "testing information!")

from os import path
for pth in ['./lib']:
    sys.path.insert(0, path.join(path.dirname(path.abspath(__file__)), pth))

# installing without importing SQLAlchemy, so that coverage includes
# SQLAlchemy itself.
path = "lib/sqlalchemy/testing/plugin/noseplugin.py"
noseplugin = imp.load_source("noseplugin", path)


nose.main(addplugins=[noseplugin.NoseSQLAlchemy()])