From 16073ae0446ea91e38443fa21cd128ef060626a1 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 2 Jun 2011 20:11:47 -0400 Subject: [PATCH] - adjust further for unix-style casing, also this is mysql not just mysqldb --- test/engine/test_reflection.py | 3 ++- test/lib/requires.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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, -- 2.39.5