]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Limit init_subclass test above python 3.6
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 8 Jul 2020 19:48:32 +0000 (15:48 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 8 Jul 2020 21:54:14 +0000 (17:54 -0400)
The commit for I1654befe9eb1c8b8e7fc0784bdbe64284614f0ea #5357
runs the test on all Python 3 versions, however we need to limit
at least python 3.6 for this.

Change-Id: Ie86b78bbfd8c7bd013ff9aa7f8905328d792c1b3

lib/sqlalchemy/testing/requirements.py
test/ext/declarative/test_basic.py

index 3e20f8681d124b975ae7b6790eb9606d9065a51d..1c350da3b1338f5b591f36ebc8e2ac4b5169a098 100644 (file)
@@ -1097,6 +1097,13 @@ class SuiteRequirements(Requirements):
             lambda: sys.version_info < (3,), "Python version 3.xx is required."
         )
 
+    @property
+    def python36(self):
+        return exclusions.skip_if(
+            lambda: sys.version_info < (3, 6),
+            "Python version 3.6 or greater is required.",
+        )
+
     @property
     def python37(self):
         return exclusions.skip_if(
index 1c03f7bd9060e8aab79195d4a93d10f4142a5e94..7713f3d77c76bf65e64489595cf59aa3f30e56dc 100644 (file)
@@ -2132,7 +2132,7 @@ class DeclarativeTest(DeclarativeTestBase):
 
         assert not hasattr(Foo, "data_hybrid")
 
-    @testing.requires.python3
+    @testing.requires.python36
     def test_kw_support_in_declarative_meta_init(self):
         # This will not fail if DeclarativeMeta __init__ supports **kw