Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Preventing nose from finding setup.py

3 views
Skip to first unread message

Roy Smith

unread,
May 24, 2013, 11:12:17 PM5/24/13
to
We've got a package (with an empty __init__.py), which contains a
setup.py file. When I run nosetests, the test discovery code finds
setup.py, thinks it's a test, and tries to run it (with predictably poor
results).

Is there some way to mark this file as not a test? If it was a method in
a file, I would decorate it with @nottest, but that doesn't work here.

Roy Smith

unread,
May 24, 2013, 11:16:57 PM5/24/13
to
In article <roy-51D3E2.2...@news.panix.com>,
Roy Smith <r...@panix.com> wrote:

> We've got a package (with an empty __init__.py), which contains a
> setup.py file. When I run nosetests, the test discovery code finds
> setup.py, thinks it's a test, and tries to run it (with predictably poor
> results).

Ugh, I described that wrong. Setup is also a package (with it's own
empty __init__.py file). But, the same problem applies. Nosetests
discovers it, tries to run it, and barfs with:

TypeError: Attribute setup of <module 'djsite.songza_web' from
'/home/roy/songza/djsite/songza_web/__init__.pyc'> is not a python
function. Only functions or callables may be used as fixtures.
0 new messages