]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Remove erroneous skip message
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Feb 2018 21:43:22 +0000 (16:43 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 19 Feb 2018 21:43:22 +0000 (16:43 -0500)
The logic here seems to try to say something different when
__backend__ is True but it produces a nonsensical message,
since __only_on__ doesn't tell us about the implementation
we are actually running.

Cross-ported from SQLAlchemy, same change id.

Change-Id: I14e20cadcba975f8efe8fdefa439c8b8c480b3ed

alembic/testing/plugin/plugin_base.py

index 83b30e3823ee82706304d012b8fe9406eae6be4f..81584230416a5418517a8575d4697d9cfe7c3007 100644 (file)
@@ -525,24 +525,20 @@ def _do_skips(cls):
                 )
 
     if not all_configs:
-        if getattr(cls, '__backend__', False):
-            msg = "'%s' unsupported for implementation '%s'" % (
-                cls.__name__, cls.__only_on__)
-        else:
-            msg = "'%s' unsupported on any DB implementation %s%s" % (
-                cls.__name__,
-                ", ".join(
-                    "'%s(%s)+%s'" % (
-                        config_obj.db.name,
-                        ".".join(
-                            str(dig) for dig in
-                            config_obj.db.dialect.server_version_info),
-                        config_obj.db.driver
-                    )
-                  for config_obj in config.Config.all_configs()
-                ),
-                ", ".join(reasons)
-            )
+        msg = "'%s' unsupported on any DB implementation %s%s" % (
+            cls.__name__,
+            ", ".join(
+                "'%s(%s)+%s'" % (
+                    config_obj.db.name,
+                    ".".join(
+                        str(dig) for dig in
+                        config_obj.db.dialect.server_version_info),
+                    config_obj.db.driver
+                )
+              for config_obj in config.Config.all_configs()
+            ),
+            ", ".join(reasons)
+        )
         raise SkipTest(msg)
     elif hasattr(cls, '__prefer_backends__'):
         non_preferred = set()