diff options
| -rw-r--r-- | lib/sqlalchemy/testing/exclusions.py | 6 | ||||
| -rw-r--r-- | test/dialect/mssql/test_types.py | 4 | ||||
| -rw-r--r-- | test/dialect/postgresql/test_types.py | 4 | ||||
| -rw-r--r-- | test/requirements.py | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/sqlalchemy/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py index 972dec3a9..c7d06fceb 100644 --- a/lib/sqlalchemy/testing/exclusions.py +++ b/lib/sqlalchemy/testing/exclusions.py @@ -407,19 +407,19 @@ def future(fn, *arg): def fails_on(db, reason=None): - return fails_if(SpecPredicate(db), reason) + return fails_if(Predicate.as_predicate(db), reason) def fails_on_everything_except(*dbs): return succeeds_if( OrPredicate([ - SpecPredicate(db) for db in dbs + Predicate.as_predicate(db) for db in dbs ]) ) def skip(db, reason=None): - return skip_if(SpecPredicate(db), reason) + return skip_if(Predicate.as_predicate(db), reason) def only_on(dbs, reason=None): diff --git a/test/dialect/mssql/test_types.py b/test/dialect/mssql/test_types.py index 17ceb6b61..e782bd5e5 100644 --- a/test/dialect/mssql/test_types.py +++ b/test/dialect/mssql/test_types.py @@ -313,9 +313,7 @@ class TypeRoundTripTest( def teardown(self): metadata.drop_all() - @testing.fails_on_everything_except( - 'mssql+pyodbc', - 'this is some pyodbc-specific feature') + @testing.fails_on_everything_except('mssql+pyodbc') def test_decimal_notation(self): numeric_table = Table( 'numeric_table', metadata, diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 00a2de2db..9d5cb4d91 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -2576,6 +2576,9 @@ class JSONRoundTripTest(fixtures.TablesTest): ) eq_(result.scalar(), 'r6') + @testing.fails_on( + "postgresql < 9.4", + "Improvement in Postgresql behavior?") def test_multi_index_query(self): engine = testing.db self._fixture_data(engine) @@ -2746,7 +2749,6 @@ class JSONBTest(JSONTest): class JSONBRoundTripTest(JSONRoundTripTest): - __only_on__ = ('postgresql >= 9.4',) __requires__ = ('postgresql_jsonb', ) test_type = JSONB diff --git a/test/requirements.py b/test/requirements.py index 56e197cb2..c25b409d7 100644 --- a/test/requirements.py +++ b/test/requirements.py @@ -784,7 +784,7 @@ class DefaultRequirements(SuiteRequirements): @property def postgresql_jsonb(self): - return skip_if( + return only_on("postgresql >= 9.4") + skip_if( lambda config: config.db.dialect.driver == "pg8000" and config.db.dialect._dbapi_version <= (1, 10, 1) |
