]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- adjust further for unix-style casing, also this is mysql not just mysqldb
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 3 Jun 2011 00:11:47 +0000 (20:11 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 3 Jun 2011 00:11:47 +0000 (20:11 -0400)
test/engine/test_reflection.py
test/lib/requires.py

index febd83c1b12842fd5b95d72bede54ff2b300d70f..acce8b6845e100ac5ab099f2badda20d55a9f794 100644 (file)
@@ -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()
index 42ac82988b456662b9e2841bed8cca8743ab341a..70a2a6036663c19d9e7d7d2c0d8175eb70e370d6 100644 (file)
@@ -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,