Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Using plugins included with a package.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Kevin Fitch  
View profile  
 More options Jun 3 2009, 10:58 am
From: Kevin Fitch <kfitc...@gmail.com>
Date: Wed, 3 Jun 2009 10:58:26 -0400
Local: Wed, Jun 3 2009 10:58 am
Subject: Re: [nose-users] Using plugins included with a package.

In a similar situation we have created a runtests.py that modifies sys.path
to include all the plugin eggs, then runs nose. At least that contains the
hack to one spot, the only downside is that the users now need to use our
script to kick off the tests instead of just doing nosetests. Although the
users could install all the plugins, then run it via nosetests.

Kevin

On Tue, Jun 2, 2009 at 11:40 PM, Waylan Limberg <way...@gmail.com> wrote:

> The tests for my package require a custom plugin (or two) to run the
> way I want them to. So I would like to ship the plugins are part of my
> package. However, I'm having trouble telling nose to use the plugins
> when running the tests before installing the package.

> I've added my plugin as an entry_point in setup.py, but I can't seem
> to get `python setup.py nosetests` to recognize the plugin and run
> with it. I figured I could just include it in setup.cfg, but it
> complains that it has no such option.

> As a quick hack, I just added `nose.main(addplugins=MyPlugin()]` to
> the bottom of my tests/__init__.py file and that works with the
> `nosetests` command. However, it doesn't work when I use `setup.py
> nosetests`. Note that when I say I added it, I didn't include it in
> any if statement of function. It is run when the file is imported.
> Really a ugly hack, but short of installing the plugin first, I don't
> see how else to specify the use of my plugins.

> What am I missing here?

> Waylan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.