[Scipy-tickets] [SciPy] #1269: stats test_distributions.py: replace old fuzz tests

SciPy Trac scipy-tickets@scipy....
Wed Oct 13 20:21:30 CDT 2010


#1269: stats test_distributions.py: replace old fuzz tests
-------------------------+--------------------------------------------------
 Reporter:  josefpktd    |       Owner:  somebody
     Type:  task         |      Status:  new     
 Priority:  normal       |   Milestone:  0.9.0   
Component:  scipy.stats  |     Version:  0.7.0   
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by josefpktd):

 the original tests are in "def test_all_distributions():"  in
 test_distributions.py
 They were initially pretty useless because the sample size was to small
 and the required (statistical) accuracy was too low. Now they use a sample
 size of 1000, and are reasonably good.

 The new tests in test_continuous_basic check many more of the methods of
 the distributions and reuse a single random sample for all tests, but test
 only for one (or a few) pre-specified set of parameters. (no random
 selection of parameters - no fuzzing)

 Currently, the new tests skip one part to avoid duplicating tests that are
 tested with the old tests.

 {{{
         if distname in distmissing:
             alpha = 0.01
             yield check_distribution_rvs, dist, args, alpha, rvs
 }}}

 I used an extended version of the original test_all_distributions as fuzz
 test over a larger set of parameters, but that file is not in the scipy
 source.

 I expect that avoiding to draw random samples twice for some distributions
 should speed up the tests.

 (Most of these tests were written when large parts of the generic methods
 were not working and I just started with numpy and scipy. By now, it would
 be possible to streamline some of the tests.)

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1269#comment:2>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list