diff options
| author | Brian Jarrett <celttechie@gmail.com> | 2014-07-20 12:44:40 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-20 12:44:40 -0400 |
| commit | cca03097f47f22783d42d1853faac6cf84607c5a (patch) | |
| tree | 4fe1a63d03a2d88d1cf37e1167759dfaf84f4ce7 /lib/sqlalchemy/testing/fixtures.py | |
| parent | 827329a0cca5351094a1a86b6b2be2b9182f0ae2 (diff) | |
| download | sqlalchemy-cca03097f47f22783d42d1853faac6cf84607c5a.tar.gz | |
- apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,
sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
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() |
