]> 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:28 +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
(cherry picked from commit 43a111e326acae85f4623b8dd507468d99d5ef3a)

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

index 515b18b156a9f7943890201bcd8171264ad3a100..e026b1691880d8fcfdb76b7b132980fbc0097320 100644 (file)
@@ -1014,6 +1014,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 ff4b2398f942a4ad60af94e91ea47e6230414307..8fabe62fff3d0a909a2069e85d6c0daaf32932fb 100644 (file)
@@ -2128,7 +2128,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