From: Denis Laxalde Date: Wed, 21 May 2025 07:23:12 +0000 (-0400) Subject: Add missing requires in the tests for older postgresql version X-Git-Tag: rel_2_0_42~51^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c25e3d0a294460eaab8e7aecdf178f93356dbd9;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Add missing requires in the tests for older postgresql version Follow up commit 39bb17442ce6ac9a3dde5e2b72376b77ffce5e28. Closes: #12612 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12612 Pull-request-sha: 894276ff232ba328cc235ecf04e84067db204c3d Change-Id: Ib8d47f11e34d6bb40d9a88d5f411c2d5fee70823 (cherry picked from commit 6154aa1b50391aa2a0e69303d8a3b5c2a17dc67a) --- diff --git a/test/dialect/postgresql/test_query.py b/test/dialect/postgresql/test_query.py index c55cd0a5d7..fc68e08ed4 100644 --- a/test/dialect/postgresql/test_query.py +++ b/test/dialect/postgresql/test_query.py @@ -1007,7 +1007,7 @@ class MatchTest(fixtures.TablesTest, AssertsCompiledSQL): (func.to_tsquery,), (func.plainto_tsquery,), (func.phraseto_tsquery,), - (func.websearch_to_tsquery,), + (func.websearch_to_tsquery, testing.skip_if("postgresql < 11")), argnames="to_ts_func", ) @testing.variation("use_regconfig", [True, False, "literal"]) diff --git a/test/dialect/postgresql/test_reflection.py b/test/dialect/postgresql/test_reflection.py index ebe751b5b3..f803069174 100644 --- a/test/dialect/postgresql/test_reflection.py +++ b/test/dialect/postgresql/test_reflection.py @@ -910,6 +910,9 @@ class ReflectionTest( subject = Table("subject", meta2, autoload_with=connection) eq_(subject.primary_key.columns.keys(), ["p2", "p1"]) + @testing.skip_if( + "postgresql < 15.0", "on delete with column list not supported" + ) def test_reflected_foreign_key_ondelete_column_list( self, metadata, connection ): diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 795a897699..0df48f6fd1 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -3548,7 +3548,11 @@ class SpecialTypesTest(fixtures.TablesTest, ComparesTables): (postgresql.INET, "127.0.0.1"), (postgresql.CIDR, "192.168.100.128/25"), (postgresql.MACADDR, "08:00:2b:01:02:03"), - (postgresql.MACADDR8, "08:00:2b:01:02:03:04:05"), + ( + postgresql.MACADDR8, + "08:00:2b:01:02:03:04:05", + testing.skip_if("postgresql < 10"), + ), argnames="column_type, value", id_="na", )