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/suite/test_sequence.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/suite/test_sequence.py')
-rw-r--r-- | lib/sqlalchemy/testing/suite/test_sequence.py | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_sequence.py b/lib/sqlalchemy/testing/suite/test_sequence.py index 6bc2822fc..bbb4ba65c 100644 --- a/lib/sqlalchemy/testing/suite/test_sequence.py +++ b/lib/sqlalchemy/testing/suite/test_sequence.py @@ -7,6 +7,7 @@ from ... import Integer, String, Sequence, schema from ..schema import Table, Column + class SequenceTest(fixtures.TablesTest): __requires__ = ('sequences',) __backend__ = True @@ -16,15 +17,15 @@ class SequenceTest(fixtures.TablesTest): @classmethod def define_tables(cls, metadata): Table('seq_pk', metadata, - Column('id', Integer, Sequence('tab_id_seq'), primary_key=True), - Column('data', String(50)) - ) + Column('id', Integer, Sequence('tab_id_seq'), primary_key=True), + Column('data', String(50)) + ) Table('seq_opt_pk', metadata, - Column('id', Integer, Sequence('tab_id_seq', optional=True), - primary_key=True), - Column('data', String(50)) - ) + Column('id', Integer, Sequence('tab_id_seq', optional=True), + primary_key=True), + Column('data', String(50)) + ) def test_insert_roundtrip(self): config.db.execute( @@ -62,7 +63,6 @@ class SequenceTest(fixtures.TablesTest): [1] ) - def _assert_round_trip(self, table, conn): row = conn.execute(table.select()).first() eq_( @@ -80,7 +80,7 @@ class HasSequenceTest(fixtures.TestBase): testing.db.execute(schema.CreateSequence(s1)) try: eq_(testing.db.dialect.has_sequence(testing.db, - 'user_id_seq'), True) + 'user_id_seq'), True) finally: testing.db.execute(schema.DropSequence(s1)) @@ -89,8 +89,8 @@ class HasSequenceTest(fixtures.TestBase): s1 = Sequence('user_id_seq', schema="test_schema") testing.db.execute(schema.CreateSequence(s1)) try: - eq_(testing.db.dialect.has_sequence(testing.db, - 'user_id_seq', schema="test_schema"), True) + eq_(testing.db.dialect.has_sequence( + testing.db, 'user_id_seq', schema="test_schema"), True) finally: testing.db.execute(schema.DropSequence(s1)) @@ -101,7 +101,7 @@ class HasSequenceTest(fixtures.TestBase): @testing.requires.schemas def test_has_sequence_schemas_neg(self): eq_(testing.db.dialect.has_sequence(testing.db, 'user_id_seq', - schema="test_schema"), + schema="test_schema"), False) @testing.requires.schemas @@ -110,7 +110,7 @@ class HasSequenceTest(fixtures.TestBase): testing.db.execute(schema.CreateSequence(s1)) try: eq_(testing.db.dialect.has_sequence(testing.db, 'user_id_seq', - schema="test_schema"), + schema="test_schema"), False) finally: testing.db.execute(schema.DropSequence(s1)) @@ -124,5 +124,3 @@ class HasSequenceTest(fixtures.TestBase): False) finally: testing.db.execute(schema.DropSequence(s1)) - - |