diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-10-30 22:24:51 +0200 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-31 12:31:56 -0400 |
| commit | ed78e679eafe787f4c152b78726bf1e1b91ab465 (patch) | |
| tree | 9ba564f0ad1f0569650fcf803157bf4576fc738f /test/sql | |
| parent | 4427ec68219b624a89dda4acb994c80fa0d8a5d7 (diff) | |
| download | sqlalchemy-ed78e679eafe787f4c152b78726bf1e1b91ab465.tar.gz | |
Remove deprecated dialects and drivers
Fixes: #7258
Change-Id: I3577f665eca04f2632b69bcb090f0a4ec9271db9
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_case_statement.py | 1 | ||||
| -rw-r--r-- | test/sql/test_compiler.py | 16 | ||||
| -rw-r--r-- | test/sql/test_functions.py | 13 | ||||
| -rw-r--r-- | test/sql/test_insert_exec.py | 2 | ||||
| -rw-r--r-- | test/sql/test_operators.py | 17 | ||||
| -rw-r--r-- | test/sql/test_query.py | 11 | ||||
| -rw-r--r-- | test/sql/test_resultset.py | 1 | ||||
| -rw-r--r-- | test/sql/test_returning.py | 7 | ||||
| -rw-r--r-- | test/sql/test_types.py | 2 |
9 files changed, 15 insertions, 55 deletions
diff --git a/test/sql/test_case_statement.py b/test/sql/test_case_statement.py index c6d5f0185..63491524c 100644 --- a/test/sql/test_case_statement.py +++ b/test/sql/test_case_statement.py @@ -56,7 +56,6 @@ class CaseTest(fixtures.TestBase, AssertsCompiledSQL): with testing.db.begin() as conn: info_table.drop(conn) - @testing.fails_on("firebird", "FIXME: unknown") @testing.requires.subqueries def test_case(self, connection): inner = select( diff --git a/test/sql/test_compiler.py b/test/sql/test_compiler.py index 419d14ce7..4c8b1a434 100644 --- a/test/sql/test_compiler.py +++ b/test/sql/test_compiler.py @@ -61,11 +61,11 @@ from sqlalchemy import types from sqlalchemy import union from sqlalchemy import union_all from sqlalchemy import util +from sqlalchemy.dialects import mssql from sqlalchemy.dialects import mysql from sqlalchemy.dialects import oracle from sqlalchemy.dialects import postgresql from sqlalchemy.dialects import sqlite -from sqlalchemy.dialects import sybase from sqlalchemy.dialects.postgresql.base import PGCompiler from sqlalchemy.dialects.postgresql.base import PGDialect from sqlalchemy.engine import default @@ -3259,7 +3259,7 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): s2 = ( select(table1.c.myid) .with_hint(table1, "index(%(name)s idx)", "oracle") - .with_hint(table1, "WITH HINT INDEX idx", "sybase") + .with_hint(table1, "WITH HINT INDEX idx", "mssql") ) a1 = table1.alias() @@ -3294,10 +3294,10 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): .with_hint(a2, "%(name)s idx1") ) - mysql_d, oracle_d, sybase_d = ( + mysql_d, oracle_d, mssql_d = ( mysql.dialect(), oracle.dialect(), - sybase.dialect(), + mssql.dialect(), ) for stmt, dialect, expected in [ @@ -3309,7 +3309,7 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): ), ( s, - sybase_d, + mssql_d, "SELECT mytable.myid FROM mytable test hint mytable", ), (s2, mysql_d, "SELECT mytable.myid FROM mytable"), @@ -3320,7 +3320,7 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): ), ( s2, - sybase_d, + mssql_d, "SELECT mytable.myid FROM mytable WITH HINT INDEX idx", ), ( @@ -3337,7 +3337,7 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): ), ( s3, - sybase_d, + mssql_d, "SELECT mytable_1.myid FROM mytable AS mytable_1 " "index(mytable_1 hint)", ), @@ -3357,7 +3357,7 @@ class SelectTest(fixtures.TestBase, AssertsCompiledSQL): ), ( s4, - sybase_d, + mssql_d, "SELECT thirdtable.userid, thirdtable.otherstuff " "FROM thirdtable " "hint3 JOIN (SELECT mytable.myid AS myid, " diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py index f3fb724c0..6c794717c 100644 --- a/test/sql/test_functions.py +++ b/test/sql/test_functions.py @@ -69,20 +69,15 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): functions._registry = self._registry def test_compile(self): - for dialect in all_dialects(exclude=("sybase",)): + for dialect in all_dialects(): bindtemplate = BIND_TEMPLATES[dialect.paramstyle] self.assert_compile( func.current_timestamp(), "CURRENT_TIMESTAMP", dialect=dialect ) self.assert_compile(func.localtime(), "LOCALTIME", dialect=dialect) - if dialect.name in ("firebird",): - self.assert_compile( - func.nosuchfunction(), "nosuchfunction", dialect=dialect - ) - else: - self.assert_compile( - func.nosuchfunction(), "nosuchfunction()", dialect=dialect - ) + self.assert_compile( + func.nosuchfunction(), "nosuchfunction()", dialect=dialect + ) # test generic function compile class fake_func(GenericFunction): diff --git a/test/sql/test_insert_exec.py b/test/sql/test_insert_exec.py index 76b4ba01e..e0e3b60a9 100644 --- a/test/sql/test_insert_exec.py +++ b/test/sql/test_insert_exec.py @@ -132,7 +132,7 @@ class InsertExecTest(fixtures.TablesTest): ret[c.key] = row._mapping[c] return ret, ipk - if testing.against("firebird", "postgresql", "oracle", "mssql"): + if testing.against("postgresql", "oracle", "mssql"): assert testing.db.dialect.implicit_returning if testing.db.dialect.implicit_returning: diff --git a/test/sql/test_operators.py b/test/sql/test_operators.py index 79aa4d794..c001dc4ef 100644 --- a/test/sql/test_operators.py +++ b/test/sql/test_operators.py @@ -15,7 +15,6 @@ from sqlalchemy import String from sqlalchemy import testing from sqlalchemy import text from sqlalchemy import util -from sqlalchemy.dialects import firebird from sqlalchemy.dialects import mssql from sqlalchemy.dialects import mysql from sqlalchemy.dialects import oracle @@ -3044,22 +3043,6 @@ class ComposedLikeOperatorsTest(fixtures.TestBase, testing.AssertsCompiledSQL): dialect=mysql.dialect(), ) - def test_startswith_firebird(self): - self.assert_compile( - column("x").startswith("y"), - "x STARTING WITH :x_1", - checkparams={"x_1": "y"}, - dialect=firebird.dialect(), - ) - - def test_not_startswith_firebird(self): - self.assert_compile( - ~column("x").startswith("y"), - "x NOT STARTING WITH :x_1", - checkparams={"x_1": "y"}, - dialect=firebird.dialect(), - ) - def test_startswith_literal_mysql(self): self.assert_compile( column("x").startswith(literal_column("y")), diff --git a/test/sql/test_query.py b/test/sql/test_query.py index 0d8170113..68a3630aa 100644 --- a/test/sql/test_query.py +++ b/test/sql/test_query.py @@ -73,9 +73,6 @@ class QueryTest(fixtures.TablesTest): test_needs_acid=True, ) - @testing.fails_on( - "firebird", "kinterbasdb doesn't send full type information" - ) def test_order_by_label(self, connection): """test that a label within an ORDER BY works on each backend. @@ -825,8 +822,6 @@ class QueryTest(fixtures.TablesTest): eq_(len(compiled._bind_processors), 1) - @testing.fails_on("firebird", "uses sql-92 rules") - @testing.fails_on("sybase", "uses sql-92 rules") @testing.skip_if(["mssql"]) def test_bind_in(self, connection): """test calling IN against a bind parameter. @@ -1190,7 +1185,6 @@ class CompoundTest(fixtures.TablesTest): ) eq_(found2, wanted) - @testing.fails_on("firebird", "doesn't like ORDER BY with UNIONs") def test_union_ordered(self, connection): t1, t2, t3 = self.tables("t1", "t2", "t3") @@ -1212,7 +1206,6 @@ class CompoundTest(fixtures.TablesTest): ] eq_(connection.execute(u).fetchall(), wanted) - @testing.fails_on("firebird", "doesn't like ORDER BY with UNIONs") @testing.requires.subqueries def test_union_ordered_alias(self, connection): t1, t2, t3 = self.tables("t1", "t2", "t3") @@ -1237,10 +1230,6 @@ class CompoundTest(fixtures.TablesTest): @testing.crashes("oracle", "FIXME: unknown, verify not fails_on") @testing.fails_on( - "firebird", - "has trouble extracting anonymous column from union subquery", - ) - @testing.fails_on( testing.requires._mysql_not_mariadb_104, "FIXME: unknown" ) @testing.fails_on("sqlite", "FIXME: unknown") diff --git a/test/sql/test_resultset.py b/test/sql/test_resultset.py index bf912bd25..d2d2b1041 100644 --- a/test/sql/test_resultset.py +++ b/test/sql/test_resultset.py @@ -1268,7 +1268,6 @@ class CursorResultTest(fixtures.TablesTest): eq_(list(r._mapping.values()), ["foo", 1]) @testing.crashes("oracle", "FIXME: unknown, verify not fails_on()") - @testing.crashes("firebird", "An identifier must begin with a letter") @testing.provide_metadata def test_column_accessor_shadow(self, connection): shadowed = Table( diff --git a/test/sql/test_returning.py b/test/sql/test_returning.py index 10bf3beb6..4069416d4 100644 --- a/test/sql/test_returning.py +++ b/test/sql/test_returning.py @@ -150,7 +150,6 @@ class ReturningTest(fixtures.TablesTest, AssertsExecutionResults): eq_(row[table.c.goofy], row["goofy"]) eq_(row["goofy"], "FOOsomegoofyBAR") - @testing.fails_on("firebird", "fb can't handle returning x AS y") def test_labeling(self, connection): table = self.tables.tables result = connection.execute( @@ -161,9 +160,6 @@ class ReturningTest(fixtures.TablesTest, AssertsExecutionResults): row = result.first()._mapping assert row["lala"] == 6 - @testing.fails_on( - "firebird", "fb/kintersbasdb can't handle the bind params" - ) def test_anon_expressions(self, connection): table = self.tables.tables GoofyType = self.GoofyType @@ -350,7 +346,7 @@ class ReturningTest(fixtures.TablesTest, AssertsExecutionResults): "inserted_primary_key", ) - @testing.fails_on_everything_except("postgresql", "firebird") + @testing.fails_on_everything_except("postgresql") def test_literal_returning(self, connection): if testing.against("postgresql"): literal_true = "true" @@ -465,7 +461,6 @@ class KeyReturningTest(fixtures.TablesTest, AssertsExecutionResults): Column("data", String(20)), ) - @testing.exclude("firebird", "<", (2, 0), "2.0+ feature") @testing.exclude("postgresql", "<", (8, 2), "8.2+ feature") def test_insert(self, connection): table = self.tables.tables diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 01266d15b..5acc5f076 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -3603,7 +3603,7 @@ class NumericRawSQLTest(fixtures.TestBase): assert isinstance(val, float) # some DBAPIs have unusual float handling - if testing.against("oracle+cx_oracle", "mysql+oursql", "firebird"): + if testing.against("oracle+cx_oracle"): eq_(round_decimal(val, 3), 46.583) else: eq_(val, 46.583) |
