[SciPy-dev] Add bz2 support to io.mmio [not tested] <--

Anne Archibald peridot.faceted@gmail....
Fri Apr 11 01:49:15 CDT 2008

On 10/04/2008, Nathan Bell <wnbell@gmail.com> wrote:

> In my experience the main benefit of the unittests is not to determine
>  whether a newly introduced feature has an error, but rather to keep
>  subsequent contributors (with less expertise/knowledge of the code)
>  from breaking it.  I tend to think of it as a contract between myself
>  and future developers.  For instance, when making substantial changes
>  to scipy.sparse I found the unittests to be immensely helpful in
>  expressing the intentions of the previous authors.

I have to agree with this - as a relatively new contributor to
numpy/scipy, I am never sure I know where and how a function I want to
modify is used. It would be easy for me to make some
apparently-sensible change that breaks all sorts of code, within
numpy/scipy and in users' applications. The fact that there are
extensive unit tests means that I can more or less go ahead and make
the change; if it passes all tests I'm pretty sure I didn't break
anything old. In short, I find that having extensive unit testing
makes it easier for new contributors to add code.

The effort required to write unittests is also fairly minimal: I
always need to test my code anyway to see if it works, so it's fairly
easy to just put my tests in numpy's test harness framework.  (My only
complaint is that it's not always as easy as it might be to tell
whether my tests are actually being run.)


More information about the Scipy-dev mailing list