First of all, we clearly need a real test framework to run our unittest
unit tests. @timj has been experimenting with nose, which is used by numpy, but I also know that py.test is a newer entry in the market. On the surface, both seen very similar, so it’s hard to tell which is better. So I asked the community what they like to use, and this is what I got:
https://storify.com/jonathansick/astronomers-py-test
So needless to say, all whole-hearted recommendations for py.test.
I think Erik Tollerud’s email on the astropy-dev mailing list sums up the technical choice well:
- we’d be happy with both nose or py.test for basic functionality
- py.test has a better plugin architecture, so we (SQuaRE and friends) would likely be much happier if we were writing our own plugins against py.test.
- py.test and nose are largely compatible in terms of the tests they run when we’re using them in a basic sense, so we can even try both initially if we really wanted
- nose development is cooling off while py.test has an extremely active development and user community.
Generally speaking, the modern astro python community is backing py.test. Overall, py.test is the best framework to invest in.