From: Philip Jenvey Date: Wed, 22 Jul 2009 02:17:26 +0000 (+0000) Subject: defer the heavier plugin setup until begin() when the plugin is definitely X-Git-Tag: rel_0_6_6~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44ceb64eb57391c45bc98254d9b30b5b76dbf3ef;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git defer the heavier plugin setup until begin() when the plugin is definitely enabled --- diff --git a/lib/sqlalchemy/test/noseplugin.py b/lib/sqlalchemy/test/noseplugin.py index 02a1b25bcc..c4f32a1630 100644 --- a/lib/sqlalchemy/test/noseplugin.py +++ b/lib/sqlalchemy/test/noseplugin.py @@ -74,14 +74,16 @@ class NoseSQLAlchemy(Plugin): def configure(self, options, conf): Plugin.configure(self, options, conf) - + self.options = options + + def begin(self): testing.db = db testing.requires = requires # Lazy setup of other options (post coverage) for fn in post_configure: - fn(options, file_config) - + fn(self.options, file_config) + def describeTest(self, test): return "" @@ -141,9 +143,6 @@ class NoseSQLAlchemy(Plugin): return True return False - #def begin(self): - #pass - def beforeTest(self, test): testing.resetwarnings()