[Sqlalchemy-commits] [5916] sqlalchemy/branches/rel_0_6: standardized tests on test_schema and test
Brought to you by:
zzzeek
From: <co...@sq...> - 2009-04-19 21:23:43
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; } #msg dt { float: left; width: 6em; font-weight: bold; } #msg dt:after { content:':';} #msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: bold} #msg dl a:link { color:#fc3; } #msg dl a:active { color:#ff0; } #msg dl a:visited { color:#cc6; } h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; } #msg ul, pre { overflow: auto; } #header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; } #patch { width: 100%; } #patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;} #patch .propset h4, #patch .binary h4 {margin:0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;} #patch .propset .diff, #patch .binary .diff {padding:10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, .info {color:#888;background:#fff;} --></style> <title>[5916] sqlalchemy/branches/rel_0_6: standardized tests on test_schema and test_schema_2.</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>5916</dd> <dt>Author</dt> <dd>empty</dd> <dt>Date</dt> <dd>2009-04-19 17:23:36 -0400 (Sun, 19 Apr 2009)</dd> </dl> <h3>Log Message</h3> <pre>standardized tests on test_schema and test_schema_2.</pre> <h3>Modified Paths</h3> <ul> <li><a href="#sqlalchemybranchesrel_0_6READMEunittests">sqlalchemy/branches/rel_0_6/README.unittests</a></li> <li><a href="#sqlalchemybranchesrel_0_6testdialectsqlitepy">sqlalchemy/branches/rel_0_6/test/dialect/sqlite.py</a></li> <li><a href="#sqlalchemybranchesrel_0_6testenginereflectionpy">sqlalchemy/branches/rel_0_6/test/engine/reflection.py</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="sqlalchemybranchesrel_0_6READMEunittests"></a> <div class="modfile"><h4>Modified: sqlalchemy/branches/rel_0_6/README.unittests (5915 => 5916)</h4> <pre class="diff"><span> <span class="info">--- sqlalchemy/branches/rel_0_6/README.unittests 2009-04-19 21:23:32 UTC (rev 5915) +++ sqlalchemy/branches/rel_0_6/README.unittests 2009-04-19 21:23:36 UTC (rev 5916) </span><span class="lines">@@ -182,7 +182,8 @@ </span><span class="cx"> </span><span class="cx"> TIPS </span><span class="cx"> ---- </span><del>-Postgres: The tests require an 'alt_schema' and 'alt_schema_2' to be present in </del><ins>+ +The tests require an 'test_schema' and 'test_schema_2' to be present in </ins><span class="cx"> the testing database. </span><span class="cx"> </span><span class="cx"> Postgres: When running the tests on postgres, postgres can get slower and </span></span></pre></div> <a id="sqlalchemybranchesrel_0_6testdialectsqlitepy"></a> <div class="modfile"><h4>Modified: sqlalchemy/branches/rel_0_6/test/dialect/sqlite.py (5915 => 5916)</h4> <pre class="diff"><span> <span class="info">--- sqlalchemy/branches/rel_0_6/test/dialect/sqlite.py 2009-04-19 21:23:32 UTC (rev 5915) +++ sqlalchemy/branches/rel_0_6/test/dialect/sqlite.py 2009-04-19 21:23:36 UTC (rev 5916) </span><span class="lines">@@ -212,24 +212,24 @@ </span><span class="cx"> def test_attached_as_schema(self): </span><span class="cx"> cx = testing.db.connect() </span><span class="cx"> try: </span><del>- cx.execute('ATTACH DATABASE ":memory:" AS alt_schema') </del><ins>+ cx.execute('ATTACH DATABASE ":memory:" AS test_schema') </ins><span class="cx"> dialect = cx.dialect </span><del>- assert dialect.table_names(cx, 'alt_schema') == [] </del><ins>+ assert dialect.table_names(cx, 'test_schema') == [] </ins><span class="cx"> </span><span class="cx"> meta = MetaData(cx) </span><span class="cx"> Table('created', meta, Column('id', Integer), </span><del>- schema='alt_schema') </del><ins>+ schema='test_schema') </ins><span class="cx"> alt_master = Table('sqlite_master', meta, autoload=True, </span><del>- schema='alt_schema') </del><ins>+ schema='test_schema') </ins><span class="cx"> meta.create_all(cx) </span><span class="cx"> </span><del>- self.assertEquals(dialect.table_names(cx, 'alt_schema'), </del><ins>+ self.assertEquals(dialect.table_names(cx, 'test_schema'), </ins><span class="cx"> ['created']) </span><span class="cx"> assert len(alt_master.c) > 0 </span><span class="cx"> </span><span class="cx"> meta.clear() </span><span class="cx"> reflected = Table('created', meta, autoload=True, </span><del>- schema='alt_schema') </del><ins>+ schema='test_schema') </ins><span class="cx"> assert len(reflected.c) == 1 </span><span class="cx"> </span><span class="cx"> cx.execute(reflected.insert(), dict(id=1)) </span><span class="lines">@@ -247,9 +247,9 @@ </span><span class="cx"> # note that sqlite_master is cleared, above </span><span class="cx"> meta.drop_all() </span><span class="cx"> </span><del>- assert dialect.table_names(cx, 'alt_schema') == [] </del><ins>+ assert dialect.table_names(cx, 'test_schema') == [] </ins><span class="cx"> finally: </span><del>- cx.execute('DETACH DATABASE alt_schema') </del><ins>+ cx.execute('DETACH DATABASE test_schema') </ins><span class="cx"> </span><span class="cx"> @testing.exclude('sqlite', '<', (2, 6), 'no database support') </span><span class="cx"> def test_temp_table_reflection(self): </span></span></pre></div> <a id="sqlalchemybranchesrel_0_6testenginereflectionpy"></a> <div class="modfile"><h4>Modified: sqlalchemy/branches/rel_0_6/test/engine/reflection.py (5915 => 5916)</h4> <pre class="diff"><span> <span class="info">--- sqlalchemy/branches/rel_0_6/test/engine/reflection.py 2009-04-19 21:23:32 UTC (rev 5915) +++ sqlalchemy/branches/rel_0_6/test/engine/reflection.py 2009-04-19 21:23:36 UTC (rev 5916) </span><span class="lines">@@ -802,7 +802,7 @@ </span><span class="cx"> # Tests related to engine.reflection </span><span class="cx"> </span><span class="cx"> def get_schema(): </span><del>- return 'alt_schema' </del><ins>+ return 'test_schema' </ins><span class="cx"> </span><span class="cx"> def createTables(meta, schema=None): </span><span class="cx"> if schema: </span></span></pre> </div> </div> </body> </html> |