else:
return str(self.compile())
- def __init__(self, *args, **kwargs):
- """Support implementations that were passing arguments"""
- if args or kwargs:
- util.warn_deprecated("Passing arguments to type object "
- "constructor %s is deprecated" % self.__class__)
-
def __repr__(self):
return util.generic_repr(self)
t1 = typ()
repr(t1)
- def test_plain_init_deprecation_warning(self):
- for typ in (Integer, Date, SmallInteger):
- assert_raises_message(
- exc.SADeprecationWarning,
- "Passing arguments to type object "
- "constructor %s is deprecated" % typ,
- typ, 11
- )
class TypeAffinityTest(fixtures.TestBase):
def test_type_affinity(self):