|Version 1 (modified by jarrod.millman, 6 years ago)|
SciPy?'s testing structure is based on the unit testing framework offered by unittest.py. scipy_test.py also provides a few helper functions.
Our goal is that every module and package in SciPy? includes a thorough set of unit tests. These tests should exercise the functionality of a routine as well as its robustness to erroneous or unexpected input arguments. The best time to write the tests is when the module itself is being written. Whenever a new bug is found in a routine, a unit test should be written to test for the error so that it can't creep back in unnoticed after future code changes.
Much of SciPy? is legacy code that was written without unit tests. As such, much of the functionality remains untested. However, more unit tests are being written all the time (and we encourage you to contribute). If you are writing a package that you'd like to become part of SciPy?, please write the tests as you develop the package.
Running SciPy?'s test suite
To run tests on the scipy package, use the following: