]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
defer the heavier plugin setup until begin() when the plugin is definitely
authorPhilip Jenvey <pjenvey@underboss.org>
Wed, 22 Jul 2009 02:17:26 +0000 (02:17 +0000)
committerPhilip Jenvey <pjenvey@underboss.org>
Wed, 22 Jul 2009 02:17:26 +0000 (02:17 +0000)
enabled

lib/sqlalchemy/test/noseplugin.py

index 02a1b25bcc53e97564600d8082a85f7270757192..c4f32a1630a86c09ecf2b84926dc474c277d7ba0 100644 (file)
@@ -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()