charset_table.drop()
@testing.exclude('mysql', '<', (5, 0, 5), 'a 5.0+ feature')
+ @testing.fails_on('mysql+oursql', 'some round trips fail, oursql bug ?')
def test_bit_50(self):
"""Exercise BIT types on 5.0+ (not valid for all engine types)"""
@classmethod
def define_tables(cls, metadata):
+ if testing.against('mysql+oursql'):
+ from sqlalchemy.dialects.mysql import VARCHAR
+ uni_type = VARCHAR(50, collation='utf8_unicode_ci')
+ else:
+ uni_type = sa.Unicode(50)
+
Table('uni_t1', metadata,
Column('id', Integer, primary_key=True,
test_needs_autoincrement=True),
- Column('txt', sa.Unicode(50), unique=True))
+ Column('txt', uni_type, unique=True))
Table('uni_t2', metadata,
Column('id', Integer, primary_key=True,
test_needs_autoincrement=True),
- Column('txt', sa.Unicode(50), ForeignKey('uni_t1')))
+ Column('txt', uni_type, ForeignKey('uni_t1')))
@classmethod
def setup_classes(cls):
class Test2(_base.BasicEntity):
pass
- @testing.fails_on('mysql+oursql', 'raises a warning')
@testing.resolve_artifact_names
def test_basic(self):
mapper(Test, uni_t1)
self.assert_(t1.txt == txt)
- @testing.fails_on('mysql+oursql', 'raises a warning')
@testing.resolve_artifact_names
def test_relation(self):
mapper(Test, uni_t1, properties={