diff options
author | Khairi Hafsham <jumanjisama@gmail.com> | 2017-02-02 13:02:21 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-02-07 11:21:56 -0500 |
commit | 772374735da27df1ddb907f4a0f5085b46dbe82b (patch) | |
tree | 41f88c835a74d4665c97853ae8676a5181d61db3 /test/dialect/postgresql/test_compiler.py | |
parent | d71f4b47186972c5248c94ee2d04364da95a0965 (diff) | |
download | sqlalchemy-772374735da27df1ddb907f4a0f5085b46dbe82b.tar.gz |
Make all tests to be PEP8 compliant
tested using pycodestyle version 2.2.0
Fixes: #3885
Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r-- | test/dialect/postgresql/test_compiler.py | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py index 160641855..eddf20877 100644 --- a/test/dialect/postgresql/test_compiler.py +++ b/test/dialect/postgresql/test_compiler.py @@ -17,6 +17,7 @@ from sqlalchemy.sql import util as sql_util from sqlalchemy.util import u, OrderedDict from sqlalchemy.dialects.postgresql import aggregate_order_by, insert + class SequenceTest(fixtures.TestBase, AssertsCompiledSQL): __prefer__ = 'postgresql' @@ -414,9 +415,14 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): m = MetaData() tbl = Table('testtbl', m, Column('data', String)) - idx1 = Index('test_idx1', tbl.c.data) - idx2 = Index('test_idx2', tbl.c.data, postgresql_tablespace='sometablespace') - idx3 = Index('test_idx3', tbl.c.data, postgresql_tablespace='another table space') + idx1 = Index('test_idx1', + tbl.c.data) + idx2 = Index('test_idx2', + tbl.c.data, + postgresql_tablespace='sometablespace') + idx3 = Index('test_idx3', + tbl.c.data, + postgresql_tablespace='another table space') self.assert_compile(schema.CreateIndex(idx1), 'CREATE INDEX test_idx1 ON testtbl ' @@ -437,13 +443,12 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): m = MetaData() tbl = Table('testtbl', m, Column('data', String)) - idx1 = Index( - 'test_idx1', - tbl.c.data, - postgresql_using='btree', - postgresql_tablespace='atablespace', - postgresql_with={"fillfactor": 60}, - postgresql_where=and_(tbl.c.data > 5, tbl.c.data < 10)) + idx1 = Index('test_idx1', + tbl.c.data, + postgresql_using='btree', + postgresql_tablespace='atablespace', + postgresql_with={"fillfactor": 60}, + postgresql_where=and_(tbl.c.data > 5, tbl.c.data < 10)) self.assert_compile(schema.CreateIndex(idx1), 'CREATE INDEX test_idx1 ON testtbl ' @@ -928,8 +933,11 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): postgresql.array([1, 2]) == [3, 4, 5], "ARRAY[%(param_1)s, %(param_2)s] = " "ARRAY[%(param_3)s, %(param_4)s, %(param_5)s]", - checkparams={'param_5': 5, 'param_4': 4, 'param_1': 1, - 'param_3': 3, 'param_2': 2} + checkparams={'param_5': 5, + 'param_4': 4, + 'param_1': 1, + 'param_3': 3, + 'param_2': 2} ) @@ -1053,7 +1061,8 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): stmt2 = sql_util.ClauseAdapter(a1).traverse(stmt) self.assert_compile( stmt2, - "SELECT array_agg(foo.a ORDER BY foo.b DESC) AS array_agg_1 FROM table1 AS foo" + "SELECT array_agg(foo.a ORDER BY foo.b DESC) AS array_agg_1 " + "FROM table1 AS foo" ) |