"""
- #def __new__(cls, value, quote, sprcls=False):
def __new__(cls, value, quote):
if value is None:
return None
return util.text_type(self).upper()
def __repr__(self):
- return util.text_type.__repr__(self)
+ backslashed = self.encode('ascii', 'backslashreplace')
+ if not util.py2k:
+ backslashed = backslashed.decode('ascii')
+ return "'%s'" % backslashed
class _truncated_label(quoted_name):
"""A unicode subclass used to identify symbolic "
m = MetaData()
t = Table(ue('\u6e2c\u8a66'), m, Column(ue('\u6e2c\u8a66_id'), Integer))
+ # I hardly understand what's going on with the backslashes in
+ # this one on py2k vs. py3k
eq_(
repr(t),
(
- "Table(u'\\u6e2c\\u8a66', MetaData(bind=None), "
- "Column(u'\\u6e2c\\u8a66_id', Integer(), table=<\\u6e2c\\u8a66>), "
+ "Table('\\u6e2c\\u8a66', MetaData(bind=None), "
+ "Column('\\u6e2c\\u8a66_id', Integer(), table=<\u6e2c\u8a66>), "
"schema=None)"))
class EscapesDefaultsTest(fixtures.TestBase):