nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 397 forks source link

how to use nose plugin? #1089

Open skyfulzhang opened 5 years ago

skyfulzhang commented 5 years ago

At nose documentation about Writing Plugins,i have see the code like this : `import logging import os

from nose.plugins import Plugin

log = logging.getLogger('nose.plugins.helloworld')

class HelloWorld(Plugin): name = 'helloworld'

def options(self, parser, env=os.environ):
    super(HelloWorld, self).options(parser, env=env)

def configure(self, options, conf):
    super(HelloWorld, self).configure(options, conf)
    if not self.enabled:
        return

def finalize(self, result):
    log.info('Hello pluginized world!')`

Now i want to use this nose plugin on commond just like nosetests -v -s --with-helloworld ,but i donot know how to use? Can you give me some suggestion?