]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- Fixed unit tests to run correctly under the SQLAlchemy 1.0.x series
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 May 2017 21:12:41 +0000 (17:12 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 May 2017 21:12:41 +0000 (17:12 -0400)
prior to version 1.0.10 where a particular bug involving Postgresql
exclude constraints was fixed.

Change-Id: Ief64b19b75e4c2c3661ac95d5b03d0c8e0fe5619
Fixes: #431
alembic/testing/requirements.py
alembic/util/__init__.py
alembic/util/sqla_compat.py
docs/build/changelog.rst
tests/test_postgresql.py

index 0d9064375da4a830b1080c4e192371f9335f2062..4468ef202687130c1315fbd6b44e991a38a0f325 100644 (file)
@@ -103,6 +103,13 @@ class SuiteRequirements(Requirements):
             "SQLAlchemy 1.0.0 or greater required"
         )
 
+    @property
+    def fail_before_sqla_1010(self):
+        return exclusions.fails_if(
+            lambda config: not util.sqla_1010,
+            "SQLAlchemy 1.0.10 or greater required"
+        )
+
     @property
     def fail_before_sqla_099(self):
         return exclusions.fails_if(
index 22411110c8accb0a42ae753497a19c42ae22e7a9..bb249dc6d102273f2f09a3b571130a310dbd2167 100644 (file)
@@ -8,7 +8,7 @@ from .pyfiles import (  # noqa
     pyc_file_from_path, load_python_file, edit)
 from .sqla_compat import (  # noqa
     sqla_07, sqla_079, sqla_08, sqla_083, sqla_084, sqla_09, sqla_092,
-    sqla_094, sqla_099, sqla_100, sqla_105, sqla_110)
+    sqla_094, sqla_099, sqla_100, sqla_105, sqla_110, sqla_1010)
 from .exc import CommandError
 
 
index 28a6548c4680d20233e8a89beb4e37ee6a68fbcf..57eacd511718e852a63598469117f59a5cb696a2 100644 (file)
@@ -28,6 +28,7 @@ sqla_094 = _vers >= (0, 9, 4)
 sqla_099 = _vers >= (0, 9, 9)
 sqla_100 = _vers >= (1, 0, 0)
 sqla_105 = _vers >= (1, 0, 5)
+sqla_1010 = _vers >= (1, 0, 10)
 sqla_110 = _vers >= (1, 1, 0)
 
 if sqla_08:
index 6cec1112e3a685e0636211a927ea5a143afc724c..9a4b152c379e9db9cf33f41b3bd92cffbf6b1439 100644 (file)
@@ -7,6 +7,14 @@ Changelog
     :version: 0.9.3
     :released:
 
+    .. change:: 431
+      :tags: bug, tests
+      :tickets: 431
+
+      Fixed unit tests to run correctly under the SQLAlchemy 1.0.x series
+      prior to version 1.0.10 where a particular bug involving Postgresql
+      exclude constraints was fixed.
+
 .. changelog::
     :version: 0.9.2
     :released: May 18, 2017
index 2ceeaa99cc7fa29c8458ced532cb6eda7ecf8ba6..f02deeb9a7a4bf813f360fbc67bb6dfb81c3795a 100644 (file)
@@ -104,7 +104,7 @@ class PostgresqlOpTest(TestBase):
             '("SomeColumn" WITH >) WHERE ("SomeColumn" > 5)'
         )
 
-    @config.requirements.fail_before_sqla_100
+    @config.requirements.fail_before_sqla_1010
     def test_create_exclude_constraint_quoted_column(self):
         context = op_fixture("postgresql")
         op.create_exclude_constraint(