]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- some mysql test tweaks ported from 0.7
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 5 May 2012 16:47:38 +0000 (12:47 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 5 May 2012 16:47:38 +0000 (12:47 -0400)
CHANGES
lib/sqlalchemy/test/requires.py
test/engine/test_transaction.py
test/orm/test_naturalpks.py

diff --git a/CHANGES b/CHANGES
index 2a41fac5073f991bbbddc3a40d5ffb0b49c4cdb9..b0f810c3b6abf98e3315fbbe2676c994e0782560 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -20,9 +20,9 @@ CHANGES
     if against a column expression that combined
     multiple entities together.  [ticket:2197]
 
-   - [bug] fixed inappropriate evaluation of user-mapped
-     object in a boolean context within query.get()
-     [ticket:2310].
+  - [bug] fixed inappropriate evaluation of user-mapped
+    object in a boolean context within query.get()
+    [ticket:2310].
 
   - Fixed bug apparent only in Python 3 whereby
     sorting of persistent + pending objects during
@@ -68,9 +68,9 @@ CHANGES
   - Cls.column.collate("some collation") now
     works.  [ticket:1776]
 
-   - [bug] Fixed the error formatting raised when 
-     a tuple is inadvertently passed to session.query()
-     [ticket:2297].
+  - [bug] Fixed the error formatting raised when 
+    a tuple is inadvertently passed to session.query()
+    [ticket:2297].
 
 - engine
   - Backported the fix for [ticket:2317] introduced
index 92dc6186dc21e857290f9060e740a1abb46683d5..f922dd5d9d200cd9493bd5c245b9e13b6a36db82 100644 (file)
@@ -325,12 +325,26 @@ def _has_sqlite():
     except ImportError:
         return False
 
+def _has_mysql_on_windows():
+    return testing.against('mysql') and \
+            testing.db.dialect._server_casing == 1
+
 def sqlite(fn):
     return _chain_decorators_on(
         fn,
         skip_if(lambda: not _has_sqlite())
     )
 
+def skip_mysql_on_windows(fn):
+    """Catchall for a large variety of MySQL on Windows failures"""
+
+    return _chain_decorators_on(
+        fn,
+        skip_if(_has_mysql_on_windows,
+            "Not supported on MySQL + Windows"
+        )
+    )
+
 def english_locale_on_postgresql(fn):
     return _chain_decorators_on(
         fn,
index 05ab42f710d4603071d73cc56075bc134855622a..91e9a32a3369a36c549b2df931b87ec5c9e7a99f 100644 (file)
@@ -270,6 +270,11 @@ class TransactionTest(TestBase):
             [(1, ), (2, )])
         connection.close()
 
+    # PG emergency shutdown:
+    # select * from pg_prepared_xacts
+    # ROLLBACK PREPARED '<xid>'
+    @testing.crashes('mysql', 'Crashing on 5.5, not worth it')
+    @testing.requires.skip_mysql_on_windows
     @testing.requires.two_phase_transactions
     @testing.requires.savepoints
     def test_mixed_two_phase_transaction(self):
index 4a55afb9395005f5c3eed9078839743d6e5cf78a..d131cf92eb303eff29592003b028129d77acf5aa 100644 (file)
@@ -14,6 +14,9 @@ from sqlalchemy.test.testing import eq_
 from test.orm import _base, _fixtures
 
 class NaturalPKTest(_base.MappedTest):
+    # MySQL 5.5 on Windows crashes (the entire server, not the client)
+    # if you screw around with ON UPDATE CASCADE type of stuff.
+    __requires__ = 'skip_mysql_on_windows',
 
     @classmethod
     def define_tables(cls, metadata):