From: Jason Kirtland Date: Fri, 27 Jul 2007 20:27:20 +0000 (+0000) Subject: Fix testing. Really. X-Git-Tag: rel_0_4beta1~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4169b03b36da9a42e8b554fb9f6fa2e0f049560;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix testing. Really. --- diff --git a/test/testlib/testing.py b/test/testlib/testing.py index 9b92f46d5c..fda85e2808 100644 --- a/test/testlib/testing.py +++ b/test/testlib/testing.py @@ -6,7 +6,7 @@ import testbase import unittest, re, sys, os from cStringIO import StringIO import testlib.config as config -sql, Metadata, clear_mappers = None, None, None +sql, MetaData, clear_mappers = None, None, None __all__ = 'PersistTest', 'AssertMixin', 'ORMTest' @@ -253,10 +253,15 @@ class ORMTest(AssertMixin): return _otest_metadata def tearDownAll(self): + global clear_mappers + if clear_mappers is None: + from sqlalchemy.orm import clear_mappers + clear_mappers() _otest_metadata.drop_all() def tearDown(self): + global clear_mappers if clear_mappers is None: from sqlalchemy.orm import clear_mappers