From: Mike Bayer Date: Fri, 3 Jun 2011 00:11:47 +0000 (-0400) Subject: - adjust further for unix-style casing, also this is mysql not just mysqldb X-Git-Tag: rel_0_7_1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16073ae0446ea91e38443fa21cd128ef060626a1;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - adjust further for unix-style casing, also this is mysql not just mysqldb --- diff --git a/test/engine/test_reflection.py b/test/engine/test_reflection.py index febd83c1b1..acce8b6845 100644 --- a/test/engine/test_reflection.py +++ b/test/engine/test_reflection.py @@ -1164,13 +1164,14 @@ class CaseSensitiveTest(fixtures.TablesTest): eq_(t1.name, "SomeTable") assert t1.c.x is not None - @testing.fails_on('mysql', 'FKs come back as lower case no matter what') + @testing.fails_if(lambda: not testing.requires._has_mysql_fully_case_sensitive()) def test_reflect_via_fk(self): m = MetaData() t2 = Table("SomeOtherTable", m, autoload=True, autoload_with=testing.db) eq_(t2.name, "SomeOtherTable") assert "SomeTable" in m.tables + @testing.fails_if(testing.requires._has_mysql_fully_case_sensitive) @testing.fails_on_everything_except('sqlite', 'mysql') def test_reflect_case_insensitive(self): m = MetaData() diff --git a/test/lib/requires.py b/test/lib/requires.py index 42ac82988b..70a2a60366 100644 --- a/test/lib/requires.py +++ b/test/lib/requires.py @@ -370,9 +370,13 @@ def _has_sqlite(): return False def _has_mysql_on_windows(): - return testing.against('mysql+mysqldb') and \ + return testing.against('mysql') and \ testing.db.dialect._server_casing == 1 +def _has_mysql_fully_case_sensitive(): + return testing.against('mysql') and \ + testing.db.dialect._server_casing == 0 + def sqlite(fn): return _chain_decorators_on( fn,