nose doesn’t discover tests on Solaris
Posted in Programming, techie, testing on March 3rd, 2010 by Aviv Ben-Yosef – 1 CommentNote: this is a technical post, to help poor souls that google this
When using nose on Solaris machines, simply running nosetests without specifying the file names will not work if you are the root user. To fix this, you must either not be root, or pass nose the argument --exe. That’s it.
Gory details: by default, nose ignores executable files. Each file it encounters it checks with os.access(test_file, os.X_OK) to see if it’s executable. Problem is that Solaris’ access function always returns success for root, regardless of actual file permissions. This is discouraged by POSIX, but known behavior.
Ensuring that you’re aware of known behaviours is crucial, as it prevents you from looking up issues with software unnecessarily. Of course, you can find these out on the web and it’s not difficult to test run them if you’re unsure what they’ll entail in terms of reversing the process or even repairing a bug or glitch yourself.
Then again, if you’re reading this tutorial you’re probably already fairly IT-savvy, so don’t pay it too much heed. Everything has its own unique digitalĀ behaviouralĀ patterns, from the latest O2 uk I phone 4 to the newest Alienware MX. It’s just a case of running checks before you start to ensure that you’re prepared for any eventuality.
I hope this saves someone the 3 hours it wasted for me
