Nose testing corner case: executable .py files

Tags: python

We’re using nose to run our tests. Easy test discovery and so. So I also went after some existing internal libraries and simplified the test running there.

There were problems though with one library: the docstrings inside the python modules weren’t being run. In a similar setup in another library, everything was fine.

I googled some and found the answer on stackoverflow: nose by default skips executable *.py files…

And the files in that single library were executable for historical reasons…

Solution: pass the –exe option to nose and they’re not skipped anymore.

 
vanrees.org logo

Reinout van Rees

My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):