]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- keep tuning this mariadb check constraint limitation
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 8 Oct 2017 22:53:08 +0000 (18:53 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 8 Oct 2017 22:53:08 +0000 (18:53 -0400)
Change-Id: I738fbd48a49e78e7103caad5872d592c0691e694

tests/requirements.py
tests/test_batch.py

index d3f8cbea21af29a9da22423def1b7ae3efc2792a..bdfa8a939640c681b46f2c82806e37947c282cad 100644 (file)
@@ -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):
index 27f0a8c2f1c63f962b425c4202b6f8d04fe8d748..afffa356aff23a0f9bba5cf71b35f8b475fc585f 100644 (file)
@@ -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"