From 58c188755a7c6228cf77fa9b656c79d3e38cc576 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 28 Mar 2014 14:58:45 -0400 Subject: [PATCH] use correct __mro__ for new mssql _Exec classes, fix #192 --- alembic/ddl/mssql.py | 4 ++-- tests/__init__.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/alembic/ddl/mssql.py b/alembic/ddl/mssql.py index 7bfe2932..fece08bd 100644 --- a/alembic/ddl/mssql.py +++ b/alembic/ddl/mssql.py @@ -124,13 +124,13 @@ class MSSQLImpl(DefaultImpl): ) super(MSSQLImpl, self).drop_column(table_name, column) -class _ExecDropConstraint(ClauseElement, Executable): +class _ExecDropConstraint(Executable, ClauseElement): def __init__(self, tname, colname, type_): self.tname = tname self.colname = colname self.type_ = type_ -class _ExecDropFKConstraint(ClauseElement, Executable): +class _ExecDropFKConstraint(Executable, ClauseElement): def __init__(self, tname, colname): self.tname = tname self.colname = colname diff --git a/tests/__init__.py b/tests/__init__.py index cd721ae4..9df27556 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -182,6 +182,7 @@ def op_fixture(dialect='default', as_sql=False, naming_convention=None): def _exec(self, construct, *args, **kw): if isinstance(construct, string_types): construct = text(construct) + assert construct.supports_execution sql = text_type(construct.compile(dialect=self.dialect)) sql = re.sub(r'[\n\t]', '', sql) self.assertion.append( -- 2.47.2