title: Automatically generate data for unit testing in Python
body: <p>I have a module to test, module includes a serie of functions / simple classes.
  Wondering if there any attempts(ie package) to generate automatically:</p>
  
  <p>1) Generate Python code from initial Python file containing function definition.</p>
  
  <p>2) This code list of call to the functions with random/parametric data as parameters.</p>
  
  <p>It is technically feasible by using inspect and python meta classes,
  usually limited to numerical type functions....(numpy array).</p>
  
  <p>Because string (ie url input) would be impossible (only parametrized...).</p>
  
  <p>EDIT: By random, it means obviously "parametric random".</p>
  
  <p>Suppose we have  </p>
  
  <pre><code>  def f(x1,x2,x3) 
  
    For all xi of f
     if type(xi) = array1D -&gt; 
         Do those tests: empty array, zeros array, negative array(random),   
        positivearray(random), high values, low values, integer array, real  
        number array, ordered array, equal space array,..... 
  
     if type(xi)=int -&gt; test  zero, 1, 2,3,4, randomValues, Negative
  </code></pre>
  
  <p>Do people think such project is possible using inspect and meta class? (limited to numpy/numerical items).</p>
  
  <p>Suppose you have a very large library..., things can be done in background.</p>