R
Roy Smith
I'm attempting to write a nose plugin. Nosetests (version 1.3.0) is not
seeing it. I'm running python 2.7.3. The plugin itself is:
mongo_reporter.py:
------------------------------------------------
import nose.plugins
import logging
log = logging.getLogger('nose.plugins.mongoreporter')
class MongoReporter(nose.plugins.Plugin):
name = "Mongo Reporter"
def options(self, parser, env):
super(MongoReporter, self).options(parser, env=env)
def configure(self, options, conf):
super(MongoReporter, self).options(options, conf)
def finalize(self, result):
log.info("Hello from Mongo Reporter")
------------------------------------------------
I also have setup.py:
------------------------------------------------
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = "Mongo Reporter",
version = "0.0",
entry_points = {
'nose.plugins.1.10': ['mongoreporter =
mongo_reporter.MongoReporter'],
},
)
------------------------------------------------
$ ./setup.py develop
running develop
running egg_info
writing Mongo_Reporter.egg-info/PKG-INFO
writing top-level names to Mongo_Reporter.egg-info/top_level.txt
writing dependency_links to Mongo_Reporter.egg-info/dependency_links.txt
writing entry points to Mongo_Reporter.egg-info/entry_points.txt
reading manifest file 'Mongo_Reporter.egg-info/SOURCES.txt'
writing manifest file 'Mongo_Reporter.egg-info/SOURCES.txt'
running build_ext
Creating
/home/roy/deploy/current/python/lib/python2.7/site-packages/Mongo-Reporte
r.egg-link (link to .)
Mongo-Reporter 0.0 is already the active version in easy-install.pth
Installed /home/roy/deploy/current/code/testing/nose
Processing dependencies for Mongo-Reporter==0.0
Finished processing dependencies for Mongo-Reporter==0.0
$ nosetests --plugins
Plugin capture
Plugin failuredetail
Plugin xunit
Plugin deprecated
Plugin skip
Plugin multiprocess
Plugin logcapture
Plugin coverage
Plugin attributeselector
Plugin doctest
Plugin profile
Plugin id
Plugin allmodules
Plugin collect-only
Plugin isolation
Plugin pdb
I'm not really familiar with setuptools, so I don't know if I've got a
"I'm doing something with nose" issue or a "I'm doing something wrong
with setuptools" issue.
seeing it. I'm running python 2.7.3. The plugin itself is:
mongo_reporter.py:
------------------------------------------------
import nose.plugins
import logging
log = logging.getLogger('nose.plugins.mongoreporter')
class MongoReporter(nose.plugins.Plugin):
name = "Mongo Reporter"
def options(self, parser, env):
super(MongoReporter, self).options(parser, env=env)
def configure(self, options, conf):
super(MongoReporter, self).options(options, conf)
def finalize(self, result):
log.info("Hello from Mongo Reporter")
------------------------------------------------
I also have setup.py:
------------------------------------------------
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = "Mongo Reporter",
version = "0.0",
entry_points = {
'nose.plugins.1.10': ['mongoreporter =
mongo_reporter.MongoReporter'],
},
)
------------------------------------------------
$ ./setup.py develop
running develop
running egg_info
writing Mongo_Reporter.egg-info/PKG-INFO
writing top-level names to Mongo_Reporter.egg-info/top_level.txt
writing dependency_links to Mongo_Reporter.egg-info/dependency_links.txt
writing entry points to Mongo_Reporter.egg-info/entry_points.txt
reading manifest file 'Mongo_Reporter.egg-info/SOURCES.txt'
writing manifest file 'Mongo_Reporter.egg-info/SOURCES.txt'
running build_ext
Creating
/home/roy/deploy/current/python/lib/python2.7/site-packages/Mongo-Reporte
r.egg-link (link to .)
Mongo-Reporter 0.0 is already the active version in easy-install.pth
Installed /home/roy/deploy/current/code/testing/nose
Processing dependencies for Mongo-Reporter==0.0
Finished processing dependencies for Mongo-Reporter==0.0
$ nosetests --plugins
Plugin capture
Plugin failuredetail
Plugin xunit
Plugin deprecated
Plugin skip
Plugin multiprocess
Plugin logcapture
Plugin coverage
Plugin attributeselector
Plugin doctest
Plugin profile
Plugin id
Plugin allmodules
Plugin collect-only
Plugin isolation
Plugin pdb
I'm not really familiar with setuptools, so I don't know if I've got a
"I'm doing something with nose" issue or a "I'm doing something wrong
with setuptools" issue.