Preventing nose from finding setup.py

R

Roy Smith

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.
 
R

Roy Smith

Roy Smith said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,197
Latest member
ScottChare

Latest Threads

Top