From: Mike Bayer Date: Sun, 8 Oct 2017 22:53:08 +0000 (-0400) Subject: - keep tuning this mariadb check constraint limitation X-Git-Tag: rel_0_9_6~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=feaea56b97a11f4f132fb5f55d8a6b71dc0b9c04;p=thirdparty%2Fsqlalchemy%2Falembic.git - keep tuning this mariadb check constraint limitation Change-Id: I738fbd48a49e78e7103caad5872d592c0691e694 --- diff --git a/tests/requirements.py b/tests/requirements.py index d3f8cbea..bdfa8a93 100644 --- a/tests/requirements.py +++ b/tests/requirements.py @@ -125,6 +125,19 @@ class DefaultRequirements(SuiteRequirements): """if a compare of Integer and BigInteger is supported yet.""" return exclusions.skip_if(["oracle"], "not supported by alembic impl") + @property + def check_constraint_reflection(self): + return exclusions.fails_on_everything_except( + "postgresql", "sqlite", self._mariadb_102 + ) + + @property + def mysql_check_reflection_or_none(self): + def go(config): + return not self._mariadb_102(config) \ + or self.sqlalchemy_1115.enabled + return exclusions.succeeds_if(go) + @property def mysql_timestamp_reflection(self): def go(config): diff --git a/tests/test_batch.py b/tests/test_batch.py index 27f0a8c2..afffa356 100644 --- a/tests/test_batch.py +++ b/tests/test_batch.py @@ -1442,14 +1442,15 @@ class BatchRoundTripMySQLTest(BatchRoundTripTest): def test_rename_column_boolean(self): super(BatchRoundTripMySQLTest, self).test_rename_column_boolean() - @exclusions.fails_if(config.requirements._mariadb_102) + @config.requirements.mysql_check_reflection_or_none def test_change_type_boolean_to_int(self): super(BatchRoundTripMySQLTest, self).test_change_type_boolean_to_int() - @exclusions.fails_if(config.requirements._mariadb_102) + @config.requirements.mysql_check_reflection_or_none def test_change_type_int_to_boolean(self): super(BatchRoundTripMySQLTest, self).test_change_type_int_to_boolean() + class BatchRoundTripPostgresqlTest(BatchRoundTripTest): __only_on__ = "postgresql"