summaryrefslogtreecommitdiff
path: root/test/dialect/test_sqlite.py
diff options
context:
space:
mode:
authorKhairi Hafsham <jumanjisama@gmail.com>2017-02-02 13:02:21 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2017-02-07 11:21:56 -0500
commit772374735da27df1ddb907f4a0f5085b46dbe82b (patch)
tree41f88c835a74d4665c97853ae8676a5181d61db3 /test/dialect/test_sqlite.py
parentd71f4b47186972c5248c94ee2d04364da95a0965 (diff)
downloadsqlalchemy-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/test_sqlite.py')
-rw-r--r--test/dialect/test_sqlite.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py
index 6735ae30d..4c462aed1 100644
--- a/test/dialect/test_sqlite.py
+++ b/test/dialect/test_sqlite.py
@@ -490,14 +490,14 @@ class DialectTest(fixtures.TestBase, AssertsExecutionResults):
# """id""" integer NOT NULL PRIMARY KEY,
# """aid""" integer NULL
# REFERENCES """a""" ("""id""")
- #)
- #''')
+ # )
+ # ''')
table1 = Table(r'"a"', metadata, autoload=True)
assert '"id"' in table1.c
- #table2 = Table(r'"b"', metadata, autoload=True)
- #j = table1.join(table2)
+ # table2 = Table(r'"b"', metadata, autoload=True)
+ # j = table1.join(table2)
# assert j.onclause.compare(table1.c['"id"']
# == table2.c['"aid"'])
@@ -751,8 +751,7 @@ class SQLTest(fixtures.TestBase, AssertsCompiledSQL):
# test quoting and all that
idx2 = Index('test_idx2', tbl.c.data,
- sqlite_where=and_(tbl.c.data > 'a', tbl.c.data
- < "b's"))
+ sqlite_where=and_(tbl.c.data > 'a', tbl.c.data < "b's"))
self.assert_compile(schema.CreateIndex(idx),
'CREATE INDEX test_idx1 ON testtbl (data) '
'WHERE data > 5 AND data < 10',
@@ -898,9 +897,10 @@ def full_text_search_missing():
testing.db.execute('CREATE VIRTUAL TABLE t using FTS3;')
testing.db.execute('DROP TABLE t;')
return False
- except:
+ except Exception:
return True
+
metadata = cattable = matchtable = None
@@ -952,7 +952,8 @@ class MatchTest(fixtures.TestBase, AssertsCompiledSQL):
def test_expression(self):
self.assert_compile(matchtable.c.title.match('somstr'),
- 'matchtable.title MATCH ?', dialect=sqlite.dialect())
+ 'matchtable.title MATCH ?',
+ dialect=sqlite.dialect())
def test_simple_match(self):
results = \
@@ -1198,7 +1199,7 @@ class ConstraintReflectionTest(fixtures.TestBase):
"d", "d1", "d2", "c", "b", "a1", "a2"]:
try:
conn.execute("drop table %s" % name)
- except:
+ except Exception:
pass
def test_legacy_quoted_identifiers_unit(self):