- 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.

Change-Id: Ief64b19b75e4c2c3661ac95d5b03d0c8e0fe5619
Fixes: #431
This commit is contained in:
Mike Bayer 2017-05-31 17:12:41 -04:00
parent d9dbfc4060
commit b526a115e7
5 changed files with 18 additions and 2 deletions

View 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(

View 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

View 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:

View 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

View 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(