diff options
Diffstat (limited to 'lib/sqlalchemy/testing/fixtures.py')
| -rw-r--r-- | lib/sqlalchemy/testing/fixtures.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index 23d010ec9..7c7b00998 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -18,6 +18,7 @@ from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta # whether or not we use unittest changes things dramatically, # as far as how py.test collection works. + class TestBase(object): # A sequence of database names to always run, regardless of the # constraints below. @@ -49,6 +50,7 @@ class TestBase(object): if hasattr(self, "tearDown"): self.tearDown() + class TablesTest(TestBase): # 'once', None @@ -222,6 +224,8 @@ class TablesTest(TestBase): for column_values in rows[table]]) from sqlalchemy import event + + class RemovesEvents(object): @util.memoized_property def _event_fns(self): @@ -239,7 +243,6 @@ class RemovesEvents(object): super_.teardown() - class _ORMTest(object): @classmethod @@ -366,14 +369,14 @@ class DeclarativeMappedTest(MappedTest): def __init__(cls, classname, bases, dict_): cls_registry[classname] = cls return DeclarativeMeta.__init__( - cls, classname, bases, dict_) + cls, classname, bases, dict_) class DeclarativeBasic(object): __table_cls__ = schema.Table _DeclBase = declarative_base(metadata=cls.metadata, - metaclass=FindFixtureDeclarative, - cls=DeclarativeBasic) + metaclass=FindFixtureDeclarative, + cls=DeclarativeBasic) cls.DeclarativeBasic = _DeclBase fn() |
