I am trying to write a nose 1x plugin. I can't seem to run many methods.
For example:
import logging
import os
from nose.plugins import Plugin
logging.basicConfig(filename='example.log',level=logging.DEBUG)
class MyPlugin(Plugin):
name = 'My Plugin'
def options(self, parser, env=os.environ):
logging.debug("in options")
def configure(self, options, conf):
super(NoseSauce, self).configure(options, conf)
if not self.enabled:
return
def begin(self):
logging.debug("in begin")
def finalize(self, result):
logging.debug("in finalize")
What I get in my log file:
DEBUG:nose.plugins.manager:DefaultPluginManager load plugin config = testconfig:TestConfig
DEBUG:root:in options
DEBUG:root:in configure
So, these methods don't seem to shoot. For example, there is no log for finalize (). When I look at the .tools.base nose, I see that there are only a few members in the Plugin class, but the "IPluginInterface" has all the methods defined, but keywords are passed instead of keywords. I don’t understand all this. I thought that Python has no interfaces, and even if it is, I do not see this interface being used anywhere.
Aaron source
share