$ nosetests
----------------------------------------------------------------------
Ran 0 tests in 0.009s
OK
$ nosetests --verbosity 4 2>&1 | grep skipped | grep tests
nose.selector: INFO: /home/jerome/Code/Customers/..../tests/test_parse_results.py is executable; skipped
$ chmod -x tests/test_parse_results.py
$ nosetests
......
----------------------------------------------------------------------
Ran 6 tests in 1.846s
OK
$ grep "^\*.py " /home/jerome/.subversion/config
*.py = svn:mime-type=text/x-python; svn:eol-style=native; svn:keywords=Id; svn:executable
# edited the file
$ grep "^\*.py " /home/jerome/.subversion/config
*.py = svn:mime-type=text/x-python; svn:eol-style=native; svn:keywords=Id
Thursday, September 17, 2009
nose, subversion and executable bits
For some reason, nose wasn't executing some of my tests. I found out that nose doesn't select test files if they have an executable bit, and that subversion was configured to create the files with the executable bit. That's a bit unfortunate as I want some python files to be executable, other not. I guess I will let them non executable by default. Worklog below
Subscribe to:
Post Comments (Atom)
I found your blog while googling for the exact same problem and it turns out there is a commandline switch on nosetests, it's called --exe and if you use that, it will run tests even if something has the executable bit set.
ReplyDelete