From 95096847d8c5d17001ef1a22e8db74f9294cab59 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 15 Feb 2010 23:59:42 +0000 Subject: [PATCH] get tests to pass for OurSQL --- test/dialect/test_mysql.py | 1 + test/orm/test_unitofwork.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/dialect/test_mysql.py b/test/dialect/test_mysql.py index 13df2243d8..9fe859f1db 100644 --- a/test/dialect/test_mysql.py +++ b/test/dialect/test_mysql.py @@ -289,6 +289,7 @@ class TypesTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL): 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)""" diff --git a/test/orm/test_unitofwork.py b/test/orm/test_unitofwork.py index 9fed9e1859..65c363646d 100644 --- a/test/orm/test_unitofwork.py +++ b/test/orm/test_unitofwork.py @@ -192,14 +192,20 @@ class UnicodeTest(_base.MappedTest): @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): @@ -208,7 +214,6 @@ class UnicodeTest(_base.MappedTest): 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) @@ -223,7 +228,6 @@ class UnicodeTest(_base.MappedTest): 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={ -- 2.47.3