License Public Domain
nose (3) nosetests (3) Pylons (10)
Owner: Stou S.
Viewable by Everyone
Editable by All Siafoo Users
Free your code from a slow death on your hard drive Join Siafoo Now or Learn More

Randomly missing nose tests? Atom Feed 1

Nosetests can't find your unit tests, but you know they exist?

We use nosetests to run the unit/integration tests for Siafoo. Because the tests take around 45 minutes to run, in full, we rely on a patched version of Bitten integrated with our Trac to automatically run the unit tests after every commit. Sometimes we have to run individual tests (or sets of tests) by hand.

To run individual test we use a command similar to to this:

nosetests -v -w ./siafoo/tests --with-pylons=test.ini test_bfield:Test.test_flux_capacitor_coefficients

And for a set of tests (i.e. all tests inside the module test_bfield), something like this:

nosetests -v -w ./siafoo/tests --with-pylons=test.ini test_bfield

For a while I have been unable to run the tests manually, the system simply could not find anything:

Ran 0 tests in 0.003s


Today, by shear accident, I discovered the problem. Permissions. It seems that in order for nosetests to find your unit test modules their permission must be set to 664.

I have no idea why it requires these permissions but it does (644 or 444 may also work I didn't try).

If they are executable (like 755) nosetests won't be able to find them.


over 11 years ago (23 May 2009 at 06:28 AM) by starsareblue
Thanks! This was really helpful.