From: Mike Bayer Date: Wed, 8 Jul 2020 19:48:32 +0000 (-0400) Subject: Limit init_subclass test above python 3.6 X-Git-Tag: rel_1_3_19~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb9cbe13a1d8c58d7708f161925b207ed9691ffb;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Limit init_subclass test above python 3.6 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) --- diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 515b18b156..e026b16918 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -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( diff --git a/test/ext/declarative/test_basic.py b/test/ext/declarative/test_basic.py index ff4b2398f9..8fabe62fff 100644 --- a/test/ext/declarative/test_basic.py +++ b/test/ext/declarative/test_basic.py @@ -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