[Scipy-svn] r3796 - in branches/testing_cleanup/scipy: cluster fftpack integrate interpolate io lib lib/blas lib/lapack linalg linsolve linsolve/umfpack maxentropy misc odr optimize sandbox/cdavid sandbox/lobpcg sandbox/multigrid sandbox/rbf sandbox/spline signal sparse special stats stats/models testing weave

scipy-svn at scipy.org scipy-svn at scipy.org
Mon Jan 7 20:26:56 EST 2008


Author: matthew.brett at gmail.com
Date: 2008-01-07 19:26:20 -0600 (Mon, 07 Jan 2008)
New Revision: 3796

Modified:
   branches/testing_cleanup/scipy/cluster/__init__.py
   branches/testing_cleanup/scipy/fftpack/__init__.py
   branches/testing_cleanup/scipy/integrate/__init__.py
   branches/testing_cleanup/scipy/interpolate/__init__.py
   branches/testing_cleanup/scipy/io/__init__.py
   branches/testing_cleanup/scipy/lib/__init__.py
   branches/testing_cleanup/scipy/lib/blas/__init__.py
   branches/testing_cleanup/scipy/lib/lapack/__init__.py
   branches/testing_cleanup/scipy/linalg/__init__.py
   branches/testing_cleanup/scipy/linsolve/__init__.py
   branches/testing_cleanup/scipy/linsolve/umfpack/__init__.py
   branches/testing_cleanup/scipy/maxentropy/__init__.py
   branches/testing_cleanup/scipy/misc/__init__.py
   branches/testing_cleanup/scipy/odr/__init__.py
   branches/testing_cleanup/scipy/optimize/__init__.py
   branches/testing_cleanup/scipy/sandbox/cdavid/__init__.py
   branches/testing_cleanup/scipy/sandbox/lobpcg/__init__.py
   branches/testing_cleanup/scipy/sandbox/multigrid/__init__.py
   branches/testing_cleanup/scipy/sandbox/rbf/__init__.py
   branches/testing_cleanup/scipy/sandbox/spline/__init__.py
   branches/testing_cleanup/scipy/signal/__init__.py
   branches/testing_cleanup/scipy/sparse/__init__.py
   branches/testing_cleanup/scipy/special/__init__.py
   branches/testing_cleanup/scipy/stats/__init__.py
   branches/testing_cleanup/scipy/stats/models/__init__.py
   branches/testing_cleanup/scipy/testing/decorators.py
   branches/testing_cleanup/scipy/testing/nosetester.py
   branches/testing_cleanup/scipy/weave/__init__.py
Log:
Module level tests and API started

Modified: branches/testing_cleanup/scipy/cluster/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/cluster/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/cluster/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -7,5 +7,5 @@
 __all__ = ['vq']
 
 import vq
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/fftpack/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/fftpack/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/fftpack/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -17,5 +17,5 @@
 del k, register_func
 
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/integrate/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/integrate/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/integrate/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -12,5 +12,5 @@
 from ode import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/interpolate/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/interpolate/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/interpolate/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -11,5 +11,5 @@
 from fitpack2 import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/io/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/io/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/io/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -85,5 +85,4 @@
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
 from scipy.testing.pkgtester import Tester
-t = Tester()
 test = Tester().test

Modified: branches/testing_cleanup/scipy/lib/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/lib/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/lib/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -1,5 +1,5 @@
 
 from info import __doc__, __all__
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/lib/blas/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/lib/blas/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/lib/blas/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -58,5 +58,5 @@
         funcs.append(func)
     return tuple(funcs)
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/lib/lapack/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/lib/lapack/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/lib/lapack/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -90,5 +90,5 @@
 func_code = %(func_name)s.func_code
 '''
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/linalg/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/linalg/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/linalg/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -28,5 +28,5 @@
 
 del k, register_func
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/linsolve/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/linsolve/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/linsolve/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -9,5 +9,5 @@
 from linsolve import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/linsolve/umfpack/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/linsolve/umfpack/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/linsolve/umfpack/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -3,5 +3,5 @@
 from umfpack import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/maxentropy/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/maxentropy/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/maxentropy/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -8,5 +8,5 @@
 from info import __doc__
 from maxentropy import *
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/misc/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/misc/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/misc/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -20,5 +20,5 @@
 
 __all__ += common.__all__
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/odr/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/odr/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/odr/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -21,6 +21,6 @@
 __all__ = ['odr', 'odr_error', 'odr_stop', 'Data', 'RealData', 'Model',
            'Output', 'ODR', 'odrpack']
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test
 #### EOF #######################################################################

Modified: branches/testing_cleanup/scipy/optimize/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/optimize/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/optimize/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -16,5 +16,5 @@
 from slsqp import fmin_slsqp
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/sandbox/cdavid/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/sandbox/cdavid/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/sandbox/cdavid/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -5,5 +5,5 @@
 from autocorr import autocorr_oneside_nofft, autocorr_fft
 from segmentaxis import segment_axis
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/sandbox/lobpcg/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/sandbox/lobpcg/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/sandbox/lobpcg/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -7,5 +7,5 @@
 
 from lobpcg import *
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/sandbox/multigrid/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/sandbox/multigrid/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/sandbox/multigrid/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -5,5 +5,5 @@
 from multilevel import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/sandbox/rbf/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/sandbox/rbf/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/sandbox/rbf/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -7,5 +7,5 @@
 from rbf import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/sandbox/spline/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/sandbox/spline/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/sandbox/spline/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -10,5 +10,5 @@
 from spline import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/signal/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/signal/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/signal/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -13,5 +13,5 @@
 from wavelets import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/sparse/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/sparse/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/sparse/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -15,5 +15,5 @@
 from spfuncs import *
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/special/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/special/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/special/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -19,5 +19,5 @@
 register_func('i0',i0)
 del register_func
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/stats/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/stats/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/stats/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -11,5 +11,5 @@
 from kde import gaussian_kde
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/stats/models/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/stats/models/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/stats/models/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -16,5 +16,5 @@
 
 __all__ = filter(lambda s:not s.startswith('_'),dir())
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test

Modified: branches/testing_cleanup/scipy/testing/decorators.py
===================================================================
--- branches/testing_cleanup/scipy/testing/decorators.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/testing/decorators.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -1,5 +1,8 @@
 """Decorators for labeling test objects."""
 
+''' String expression which is true for all undecorated tests '''
+undecorated_def = 'not slow'
+
 def slow(t):
     """Labels a test as 'slow'.
 

Modified: branches/testing_cleanup/scipy/testing/nosetester.py
===================================================================
--- branches/testing_cleanup/scipy/testing/nosetester.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/testing/nosetester.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -4,6 +4,8 @@
 
 import nose
 
+from scipy.testing.decorators import undecorated_def
+
 class NoseTester(object):
     """ Scipy nose tests site manager.
 
@@ -14,7 +16,8 @@
     def __init__(self, package=None):
         if package is None:
             f = sys._getframe(1)
-            package = f.f_locals.get('__file__',f.f_globals.get('__file__',None))
+            package = f.f_locals.get('__file__',
+                                     f.f_globals.get('__file__',None))
             assert package is not None
             self.package_path = os.path.dirname(package)
         else:
@@ -47,9 +50,14 @@
         self.package_path = os.path.abspath(package)
         return
 
-    def test(self, labels=None, *args, **kwargs):
+    def test(self, labels=None, verbose=0, extra_argv=None):
         if labels is None:
-            labels = []
-        argv = ['', self.package_path]
+            labels = undecorated_def
+        argv = ['', self.package_path, '-s']
+        if labels not in ('', 'all'):
+            argv += ['-A', labels]
+        argv += ['--verbosity', str(verbose)]
+        if extra_argv is not None:
+            argv+= extra_argv
         nose.run(argv=argv)
         

Modified: branches/testing_cleanup/scipy/weave/__init__.py
===================================================================
--- branches/testing_cleanup/scipy/weave/__init__.py	2008-01-08 00:11:08 UTC (rev 3795)
+++ branches/testing_cleanup/scipy/weave/__init__.py	2008-01-08 01:26:20 UTC (rev 3796)
@@ -18,5 +18,5 @@
 except:
     pass
 
-from numpy.testing import NumpyTest
-test = NumpyTest().test
+from scipy.testing.pkgtester import Tester
+test = Tester().test




More information about the Scipy-svn mailing list