def adapt(self, impltype, **kw):
kw["retrieve_as_bitwise"] = self.retrieve_as_bitwise
return util.constructor_copy(self, impltype, *self.values, **kw)
+
+ def __repr__(self):
+ return util.generic_repr(self, to_inspect=[SET, _StringType])
[("", ""), ("", ""), ("two", "two"), (None, None)],
)
+ @testing.combinations(
+ ([""]),
+ (["a"]),
+ (["a", "b"]),
+ (["a", "b", "c"]),
+ argnames="value",
+ )
+ def test_set_repr(self, value):
+ val = ", ".join((f"'{i}'" for i in value))
+ eq_(
+ repr(Column("e", mysql.SET(*value, retrieve_as_bitwise=True))),
+ f"Column('e', SET({val}), table=None)",
+ )
+
def colspec(c):
return testing.db.dialect.ddl_compiler(