Fixed bug where ``__repr__`` of :class:`.ColumnDefault` would fail
if the argument were a tuple. Pull request courtesy Nicolas Caniart.
Change-Id: I08aa2448ef91054c43d6068ac54cedbdf7a83d64
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/1
Fixes: #4126
(cherry picked from commit
5acc9b149a4f7c44b8e7fbe926c0c5de8f13b2c4)
--- /dev/null
+.. change::
+ :tags: bug, sql
+ :tickets: 4126
+ :versions: 1.2.0b4
+
+ Fixed bug where ``__repr__`` of :class:`.ColumnDefault` would fail
+ if the argument were a tuple. Pull request courtesy Nicolas Caniart.
\ No newline at end of file
__visit_name__ = property(_visit_name)
def __repr__(self):
- return "ColumnDefault(%r)" % self.arg
+ return "ColumnDefault(%r)" % (self.arg, )
class Sequence(DefaultGenerator):
"CheckConstraint("
"%s"
", name='someconstraint')" % repr(ck.sqltext)),
+ (ColumnDefault(('foo', 'bar')), "ColumnDefault(('foo', 'bar'))")
):
eq_(
repr(const),