[TIP] Bootstrapping Nose
varmaa at gmail.com
Fri Jul 11 12:03:45 PDT 2008
Thanks for the suggestions. The plugin I wrote for finding xpcshell tests
worked because I just manually passed it in to nose; see the bottom of this
On Fri, Jul 11, 2008 at 11:51 AM, Kumar McMillan <kumar.mcmillan at gmail.com>
> On Fri, Jul 11, 2008 at 11:35 AM, Atul Varma <varmaa at gmail.com> wrote:
> > To use it, one just has to "import getnose" before they "import nose".
> > nose isn't already installed system-wide, the nose package is
> > downloaded and untarred in the current directory and the proper directory
> > added to sys.path (thereby obviating any need for admin privileges).
> > Weave's testing infrastructure is able to use nose without having to
> > explicitly require developers to retrieve it.
> > Would this be of use to anyone? Or was there an easier way for me to
> > achieve the same end? I'm just curious.
> Atul, that definitely seems useful. Managing dependencies will always
> be tricky, IMO, and bootstrapping always feels awkward. Some similar
> ways you could do it would be to create a buildout recipe or use Poach
> Buildout: http://pypi.python.org/pypi/zc.buildout/
> I believe you'd want to make a buildout.cfg something like this
> parts = nose
> bin-directory = .
> recipe = zc.recipe.egg
> eggs = nose
> ... then I think you will get the script ./nosetests to run. IIRC
> buildout has its own automatic bootstrapping mechanism so that you
> don't have to have buildout or setuptools installed. I think.
> Poach Eggs -- I haven't used it myself but if I understand it's a way
> to simply add a list of requirements to a file and from that build the
> eggs locally. *However* I don't know if it does automatic
> bootstrapping for the PoachEggs and setuptools installation
> As for your approach, it's simple and elegant so that's a plus. Do
> plugins still work like this? I imagine they would work as long as
> they were easy_install'd since that activates their entry points. If
> you wanted to install local plugins without system wide installation
> then I don't think adding to sys.path will be enough. You'd have to
> use one of the above approaches since they hook into the setuptools
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python