From ed535649d423020c816e66869016992df25e456e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 27 Aug 2015 18:04:25 -0400 Subject: - The :class:`.TypeDecorator` type extender will now work in conjunction with a :class:`.SchemaType` implementation, typically :class:`.Enum` or :class:`.Boolean` with regards to ensuring that the per-table events are propagated from the implementation type to the outer type. These events are used to ensure that the constraints or Postgresql types (e.g. ENUM) are correctly created (and possibly dropped) along with the parent table. fixes #2919 --- test/sql/test_types.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'test/sql') diff --git a/test/sql/test_types.py b/test/sql/test_types.py index e32126a18..288482392 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -1178,16 +1178,13 @@ class EnumTest(AssertsCompiledSQL, fixtures.TestBase): def __init__(self, name): self.name = name - class MyEnum(types.SchemaType, TypeDecorator): + class MyEnum(TypeDecorator): def __init__(self, values): self.impl = Enum( *[v.name for v in values], name="myenum", native_enum=False) - def _set_table(self, table, column): - self.impl._set_table(table, column) - # future method def process_literal_param(self, value, dialect): return value.name @@ -2007,12 +2004,9 @@ class BooleanTest( def __init__(self, value): self.value = value - class MyBool(types.SchemaType, TypeDecorator): + class MyBool(TypeDecorator): impl = Boolean() - def _set_table(self, table, column): - self.impl._set_table(table, column) - # future method def process_literal_param(self, value, dialect): return value.value -- cgit v1.2.1