insomnihack

When sleep eludes, the keyboard beckons

Nose – Fix nosetests finding 0 tests

November 26, 2009 Dale 2 Comments

I ran into an odd problem with nosetests not finding my unit test files after a git pull. After a little googling, I found someone who’d had similar issues with the permissions of their test files getting changed. For whatever reason (perhaps pushing from Cygwin on a Windows box?), my git pull had set the execution bit on my test files.

Typically, nosetests ignores executable files unless you pass it the --exe command line option. For now, I ran a chmod -x path/to/test.py to make the file non-executable again. I’m going to have to keep an eye on this to see if it reoccurs.

Programming Python, unit tests

Comments

  1. saurabh says

    July 30, 2011 at 6:50 AM

    Hi,

    I was facing the same problem with the execution bit set on the test program. Your post helped me fix it. Thanks.

Trackbacks

  1. git init | insomnihack says:
    December 5, 2009 at 1:48 PM

    […] ran into a odd issue with test file permissions getting set to executable. I suspect the issue is related to git on Cygwin. Cygwin on an NTFS drive apparently assumes the […]

Leave a Reply

Your email address will not be published. Required fields are marked *

About Me

Hi, my name's Dale, and this is my tech blog. Read More…

Search

Tags

blogging c# database Django documentation Email furniture git hacks htpc IPython Linux mac nas packaging PyCharm Python Roleplaying tools twitter unit tests virtualenv Visual Studio vmware Windows

Copyright © 2025 · Equilibre Theme on Genesis Framework · WordPress · Log in