Changes between Version 8 and Version 9 of TestingGuidelines

Show
Ignore:
Timestamp:
01/15/07 02:03:13 (6 years ago)
Author:
jarrod.millman
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TestingGuidelines

    v8 v9  
    55 
    66Our 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. 
    7  
    8 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. 
    97 
    108== Running !SciPy's test suite == 
     
    2018 
    2119=== Levels and verbosity === 
     20The test method may takes two arguments; the first specifies the level of testing and the second the verbosity: 
     21{{{ 
     22>>> scipy.test(level=1, verbosity=2) 
     23}}} 
     24The test level can be varied from 1 to 10. Increasing the verbosity provides more detailed messages about what tests are being executed. 
     25{{{ 
     26level: 
     27  None           --- do nothing, return None 
     28  < 0            --- scan for tests of level=abs(level), 
     29                     don't run them, return TestSuite-list 
     30  > 0            --- scan for tests of level, run them, 
     31                     return TestRunner 
     32 
     33verbosity: 
     34  >= 0           --- show information messages 
     35  > 1            --- show warnings on missing tests 
     36}}} 
    2237 
    2338== Writing your own tests == 
     39Much 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. 
    2440 
    2541=== Setting up a module for testing ===