From 44ceb64eb57391c45bc98254d9b30b5b76dbf3ef Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Wed, 22 Jul 2009 02:17:26 +0000 Subject: [PATCH] defer the heavier plugin setup until begin() when the plugin is definitely enabled --- lib/sqlalchemy/test/noseplugin.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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() -- 2.47.3