From a4169b03b36da9a42e8b554fb9f6fa2e0f049560 Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Fri, 27 Jul 2007 20:27:20 +0000 Subject: [PATCH] Fix testing. Really. --- test/testlib/testing.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.47.3