diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-03-25 16:59:27 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-03-25 16:59:27 -0400 |
| commit | c87f6af48cdfb07efa49c407333b642dec2196b1 (patch) | |
| tree | cc1b92ccab2de75e77a0c5e64bf8bfe060f5eaf7 /lib/sqlalchemy | |
| parent | 07c9bc77f7e6a2938d8453c01dd00f1294050933 (diff) | |
| download | sqlalchemy-c87f6af48cdfb07efa49c407333b642dec2196b1.tar.gz | |
- add a nose runner that erases out argv, otherwise
you get "import test" as what it tries to run with
setup.py test
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/dialects/mysql/base.py | 1 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/plugin/noseplugin.py | 1 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/runner.py | 10 |
3 files changed, 10 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 62598ad00..f83020d93 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -2409,7 +2409,6 @@ class MySQLTableDefinitionParser(object): state.constraints.append(spec) else: pass - return state def _parse_constraints(self, line): diff --git a/lib/sqlalchemy/testing/plugin/noseplugin.py b/lib/sqlalchemy/testing/plugin/noseplugin.py index 4ce76363e..6ad884e94 100644 --- a/lib/sqlalchemy/testing/plugin/noseplugin.py +++ b/lib/sqlalchemy/testing/plugin/noseplugin.py @@ -361,7 +361,6 @@ class NoseSQLAlchemy(Plugin): The class being examined by the selector """ - if not issubclass(cls, fixtures.TestBase): return False elif cls.__name__.startswith('_'): diff --git a/lib/sqlalchemy/testing/runner.py b/lib/sqlalchemy/testing/runner.py index 6ec73d7c8..2bdbaebd1 100644 --- a/lib/sqlalchemy/testing/runner.py +++ b/lib/sqlalchemy/testing/runner.py @@ -31,3 +31,13 @@ import nose def main(): nose.main(addplugins=[NoseSQLAlchemy()]) + +def setup_py_test(): + """Runner to use for the 'test_suite' entry of your setup.py. + + Prevents any name clash shenanigans from the command line + argument "test" that the "setup.py test" command sends + to nose. + + """ + nose.main(addplugins=[NoseSQLAlchemy()], argv=['runner']) |
