Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #47718
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Why doesn't nose see my plugin? |
| Date | 2013-06-11 20:54 -0400 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-FDF804.20545811062013@news.panix.com> (permalink) |
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.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Why doesn't nose see my plugin? Roy Smith <roy@panix.com> - 2013-06-11 20:54 -0400
Re: Why doesn't nose see my plugin? alex23 <wuwei23@gmail.com> - 2013-06-11 18:37 -0700
Re: Why doesn't nose see my plugin? Roy Smith <roy@panix.com> - 2013-06-11 21:43 -0400
Re: Why doesn't nose see my plugin? alex23 <wuwei23@gmail.com> - 2013-06-11 18:45 -0700
Re: Why doesn't nose see my plugin? Roy Smith <roy@panix.com> - 2013-06-11 22:18 -0400
Re: Why doesn't nose see my plugin? (FIXED) roy@panix.com (Roy Smith) - 2013-06-12 12:12 -0400
Re: Why doesn't nose see my plugin? (FIXED) alex23 <wuwei23@gmail.com> - 2013-06-12 23:18 -0700
csiph-web