From: Mike Bayer Date: Wed, 29 Aug 2012 16:18:41 +0000 (-0400) Subject: merge MySQL innodb-by-default test fixes X-Git-Tag: rel_0_7_9~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b711511c124d4f385d034181924bf566707aba0b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git merge MySQL innodb-by-default test fixes --- diff --git a/test/dialect/test_mysql.py b/test/dialect/test_mysql.py index d794fd2b8c..d718a6c731 100644 --- a/test/dialect/test_mysql.py +++ b/test/dialect/test_mysql.py @@ -2,17 +2,13 @@ from test.lib.testing import eq_, assert_raises, assert_raises_message -# Py2K -import sets -# end Py2K from sqlalchemy import * -from sqlalchemy import sql, exc, schema, types as sqltypes, event +from sqlalchemy import sql, exc, schema, types as sqltypes from sqlalchemy.dialects.mysql import base as mysql from sqlalchemy.engine.url import make_url - -from test.lib.testing import eq_ -from test.lib import * +from test.lib import fixtures, AssertsCompiledSQL, AssertsExecutionResults +from test.lib import testing, engines from test.lib.engines import utf8_engine import datetime diff --git a/test/lib/schema.py b/test/lib/schema.py index 0cd38bc647..2328770d56 100644 --- a/test/lib/schema.py +++ b/test/lib/schema.py @@ -21,6 +21,8 @@ def Table(*args, **kw): if 'mysql_engine' not in kw and 'mysql_type' not in kw: if 'test_needs_fk' in test_opts or 'test_needs_acid' in test_opts: kw['mysql_engine'] = 'InnoDB' + else: + kw['mysql_engine'] = 'MyISAM' # Apply some default cascading rules for self-referential foreign keys. # MySQL InnoDB has some issues around seleting self-refs too. diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py index aaca06fb42..739065d0db 100644 --- a/test/sql/test_metadata.py +++ b/test/sql/test_metadata.py @@ -670,6 +670,7 @@ class MetaDataTest(fixtures.TestBase, ComparesTables): class TableTest(fixtures.TestBase, AssertsCompiledSQL): def test_prefixes(self): + from sqlalchemy import Table table1 = Table("temporary_table_1", MetaData(), Column("col1", Integer), prefixes = ["TEMPORARY"])