[Scipy-svn] r4557 - in trunk/scipy: cluster/tests fftpack/benchmarks fftpack/tests integrate/tests interpolate/tests io/tests lib/blas/tests lib/lapack/tests linalg/benchmarks linalg/tests maxentropy/tests misc/tests ndimage/tests odr/tests optimize/benchmarks optimize/tests signal/tests sparse/benchmarks sparse/linalg/dsolve/tests sparse/linalg/eigen/arpack/tests sparse/linalg/eigen/lobpcg/tests sparse/tests special/tests stats stats/models/tests stats/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Jul 22 14:52:20 EDT 2008


Author: alan.mcintyre
Date: 2008-07-22 13:51:24 -0500 (Tue, 22 Jul 2008)
New Revision: 4557

Modified:
   trunk/scipy/cluster/tests/test_hierarchy.py
   trunk/scipy/cluster/tests/test_vq.py
   trunk/scipy/fftpack/benchmarks/bench_basic.py
   trunk/scipy/fftpack/benchmarks/bench_pseudo_diffs.py
   trunk/scipy/fftpack/tests/test_basic.py
   trunk/scipy/fftpack/tests/test_helper.py
   trunk/scipy/fftpack/tests/test_pseudo_diffs.py
   trunk/scipy/integrate/tests/test_integrate.py
   trunk/scipy/integrate/tests/test_quadpack.py
   trunk/scipy/integrate/tests/test_quadrature.py
   trunk/scipy/interpolate/tests/test_fitpack.py
   trunk/scipy/interpolate/tests/test_interpolate.py
   trunk/scipy/interpolate/tests/test_polyint.py
   trunk/scipy/interpolate/tests/test_rbf.py
   trunk/scipy/io/tests/test_array_import.py
   trunk/scipy/io/tests/test_mmio.py
   trunk/scipy/io/tests/test_npfile.py
   trunk/scipy/io/tests/test_recaster.py
   trunk/scipy/lib/blas/tests/test_blas.py
   trunk/scipy/lib/blas/tests/test_fblas.py
   trunk/scipy/lib/lapack/tests/test_lapack.py
   trunk/scipy/linalg/benchmarks/bench_basic.py
   trunk/scipy/linalg/tests/test_basic.py
   trunk/scipy/linalg/tests/test_blas.py
   trunk/scipy/linalg/tests/test_decomp.py
   trunk/scipy/linalg/tests/test_fblas.py
   trunk/scipy/linalg/tests/test_lapack.py
   trunk/scipy/linalg/tests/test_matfuncs.py
   trunk/scipy/maxentropy/tests/test_maxentropy.py
   trunk/scipy/misc/tests/test_pilutil.py
   trunk/scipy/ndimage/tests/test_ndimage.py
   trunk/scipy/ndimage/tests/test_registration.py
   trunk/scipy/odr/tests/test_odr.py
   trunk/scipy/optimize/benchmarks/bench_zeros.py
   trunk/scipy/optimize/tests/test_cobyla.py
   trunk/scipy/optimize/tests/test_nonlin.py
   trunk/scipy/optimize/tests/test_optimize.py
   trunk/scipy/optimize/tests/test_slsqp.py
   trunk/scipy/optimize/tests/test_zeros.py
   trunk/scipy/signal/tests/test_signaltools.py
   trunk/scipy/signal/tests/test_wavelets.py
   trunk/scipy/sparse/benchmarks/bench_sparse.py
   trunk/scipy/sparse/linalg/dsolve/tests/test_linsolve.py
   trunk/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py
   trunk/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py
   trunk/scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py
   trunk/scipy/sparse/tests/test_base.py
   trunk/scipy/sparse/tests/test_construct.py
   trunk/scipy/sparse/tests/test_spfuncs.py
   trunk/scipy/sparse/tests/test_sputils.py
   trunk/scipy/special/tests/test_basic.py
   trunk/scipy/special/tests/test_spfun_stats.py
   trunk/scipy/stats/models/tests/test_bspline.py
   trunk/scipy/stats/models/tests/test_formula.py
   trunk/scipy/stats/models/tests/test_glm.py
   trunk/scipy/stats/models/tests/test_regression.py
   trunk/scipy/stats/models/tests/test_rlm.py
   trunk/scipy/stats/models/tests/test_scale.py
   trunk/scipy/stats/models/tests/test_utils.py
   trunk/scipy/stats/morestats.py
   trunk/scipy/stats/tests/test_distributions.py
   trunk/scipy/stats/tests/test_mmorestats.py
   trunk/scipy/stats/tests/test_morestats.py
   trunk/scipy/stats/tests/test_mstats.py
   trunk/scipy/stats/tests/test_stats.py
Log:
Use numpy.testing.verbose to control when information not related to a test 
failure is displayed.
Updated "if __name__ == '__main__'" boilerplate to use numpy.testing.run_module_suite
instead of directly using nose.run.
Removed code/functions (set_package_path,set_local_path,restore_path) that 
manipulates sys.path.
Replaced print statements containing user warnings with warnings.warn.



Modified: trunk/scipy/cluster/tests/test_hierarchy.py
===================================================================
--- trunk/scipy/cluster/tests/test_hierarchy.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/cluster/tests/test_hierarchy.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -122,7 +122,8 @@
         Yr = squareform(A)
         s = A.shape
         k = 0
-        print A.shape, Y.shape, Yr.shape
+        if verbose >= 3:
+            print A.shape, Y.shape, Yr.shape
         self.failUnless(len(s) == 2)
         self.failUnless(len(Yr.shape) == 1)
         self.failUnless(s[0] == s[1])
@@ -144,7 +145,8 @@
             X = numpy.random.rand(n, 4)
             Y = pdist(X)
             A = squareform(Y)
-            print A.shape, Y.shape
+            if verbose >= 3:
+                print A.shape, Y.shape
             self.failUnless(numobs_dm(A) == n)
 
     def test_numobs_y_multi_matrix(self):
@@ -206,5 +208,5 @@
     return numpy.abs(a - b).max() < tol
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()
 

Modified: trunk/scipy/cluster/tests/test_vq.py
===================================================================
--- trunk/scipy/cluster/tests/test_vq.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/cluster/tests/test_vq.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -182,4 +182,4 @@
             pass
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/fftpack/benchmarks/bench_basic.py
===================================================================
--- trunk/scipy/fftpack/benchmarks/bench_basic.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/fftpack/benchmarks/bench_basic.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -217,4 +217,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/fftpack/benchmarks/bench_pseudo_diffs.py
===================================================================
--- trunk/scipy/fftpack/benchmarks/bench_pseudo_diffs.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/fftpack/benchmarks/bench_pseudo_diffs.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -183,4 +183,4 @@
             print ' (secs for %s calls)' % (repeat)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/fftpack/tests/test_basic.py
===================================================================
--- trunk/scipy/fftpack/tests/test_basic.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/fftpack/tests/test_basic.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -389,4 +389,4 @@
             assert_array_almost_equal (fftn(ifftn(x)),x)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/fftpack/tests/test_helper.py
===================================================================
--- trunk/scipy/fftpack/tests/test_helper.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/fftpack/tests/test_helper.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -58,4 +58,4 @@
         assert_array_almost_equal(10*pi*rfftfreq(10,pi),x)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/fftpack/tests/test_pseudo_diffs.py
===================================================================
--- trunk/scipy/fftpack/tests/test_pseudo_diffs.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/fftpack/tests/test_pseudo_diffs.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -314,4 +314,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/integrate/tests/test_integrate.py
===================================================================
--- trunk/scipy/integrate/tests/test_integrate.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/integrate/tests/test_integrate.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -143,4 +143,4 @@
 #------------------------------------------------------------------------------
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/integrate/tests/test_quadpack.py
===================================================================
--- trunk/scipy/integrate/tests/test_quadpack.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/integrate/tests/test_quadpack.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -104,4 +104,4 @@
                     8/3.0 * (b**4.0 - a**4.0))
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/integrate/tests/test_quadrature.py
===================================================================
--- trunk/scipy/integrate/tests/test_quadrature.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/integrate/tests/test_quadrature.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -29,4 +29,4 @@
         assert_equal(romb(numpy.arange(17)),128)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/interpolate/tests/test_fitpack.py
===================================================================
--- trunk/scipy/interpolate/tests/test_fitpack.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/interpolate/tests/test_fitpack.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -144,4 +144,4 @@
         assert_array_almost_equal(lut(x,y),z)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/interpolate/tests/test_interpolate.py
===================================================================
--- trunk/scipy/interpolate/tests/test_interpolate.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/interpolate/tests/test_interpolate.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -245,4 +245,4 @@
         assert_array_almost_equal(p.coeffs,pl.coeffs)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/interpolate/tests/test_polyint.py
===================================================================
--- trunk/scipy/interpolate/tests/test_polyint.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/interpolate/tests/test_polyint.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -259,4 +259,4 @@
 
 
 if __name__=='__main__':
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/interpolate/tests/test_rbf.py
===================================================================
--- trunk/scipy/interpolate/tests/test_rbf.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/interpolate/tests/test_rbf.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -36,5 +36,4 @@
     assert_array_almost_equal(di, d)
 
 if __name__ == "__main__":
-    import nose
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/io/tests/test_array_import.py
===================================================================
--- trunk/scipy/io/tests/test_array_import.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/io/tests/test_array_import.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -24,7 +24,8 @@
         fid.close()
         # Reopen the file and read in data
         fid = open(fname,"rb")
-        print "\nDon't worry about a warning regarding the number of bytes read."
+        if verbose >= 3:
+            print "\nDon't worry about a warning regarding the number of bytes read."
         b = numpyio.fread(fid,1000000,N.Int16,N.Int)
         fid.close()
         assert(N.product(a.astype(N.Int16) == b,axis=0))
@@ -64,4 +65,4 @@
         f.close()
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/io/tests/test_mmio.py
===================================================================
--- trunk/scipy/io/tests/test_mmio.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/io/tests/test_mmio.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -315,4 +315,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/io/tests/test_npfile.py
===================================================================
--- trunk/scipy/io/tests/test_npfile.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/io/tests/test_npfile.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -102,4 +102,4 @@
         assert_array_equal(npf.read_array(adt, shp, order='C'), cf_arr)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/io/tests/test_recaster.py
===================================================================
--- trunk/scipy/io/tests/test_recaster.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/io/tests/test_recaster.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -173,4 +173,4 @@
                    'Expected %s from %s, got %s' % (outp, inp, dtt)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/lib/blas/tests/test_blas.py
===================================================================
--- trunk/scipy/lib/blas/tests/test_blas.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/lib/blas/tests/test_blas.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -223,4 +223,4 @@
 """
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/lib/blas/tests/test_fblas.py
===================================================================
--- trunk/scipy/lib/blas/tests/test_fblas.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/lib/blas/tests/test_fblas.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -522,4 +522,4 @@
 """
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/lib/lapack/tests/test_lapack.py
===================================================================
--- trunk/scipy/lib/lapack/tests/test_lapack.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/lib/lapack/tests/test_lapack.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -21,10 +21,10 @@
 
 from scipy.lib.lapack import flapack, clapack
 
-sys.path.insert(0, os.path.split(__file__))
+#sys.path.insert(0, os.path.split(__file__))
 from gesv_tests import _test_gev
 from esv_tests import _test_ev
-del sys.path[0]
+#del sys.path[0]
 
 #class _test_ev: pass
 

Modified: trunk/scipy/linalg/benchmarks/bench_basic.py
===================================================================
--- trunk/scipy/linalg/benchmarks/bench_basic.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/linalg/benchmarks/bench_basic.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -127,4 +127,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/linalg/tests/test_basic.py
===================================================================
--- trunk/scipy/linalg/tests/test_basic.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/linalg/tests/test_basic.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -429,4 +429,4 @@
         assert_array_almost_equal(a_pinv,a_pinv2)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/linalg/tests/test_blas.py
===================================================================
--- trunk/scipy/linalg/tests/test_blas.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/linalg/tests/test_blas.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -213,4 +213,4 @@
 """
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/linalg/tests/test_decomp.py
===================================================================
--- trunk/scipy/linalg/tests/test_decomp.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/linalg/tests/test_decomp.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -906,4 +906,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/linalg/tests/test_fblas.py
===================================================================
--- trunk/scipy/linalg/tests/test_fblas.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/linalg/tests/test_fblas.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -525,4 +525,4 @@
 """
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/linalg/tests/test_lapack.py
===================================================================
--- trunk/scipy/linalg/tests/test_lapack.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/linalg/tests/test_lapack.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -68,4 +68,4 @@
 """
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/linalg/tests/test_matfuncs.py
===================================================================
--- trunk/scipy/linalg/tests/test_matfuncs.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/linalg/tests/test_matfuncs.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -98,4 +98,4 @@
         assert_array_almost_equal(expm3(a),[[1,0],[0,1]])
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/maxentropy/tests/test_maxentropy.py
===================================================================
--- trunk/scipy/maxentropy/tests/test_maxentropy.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/maxentropy/tests/test_maxentropy.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -36,4 +36,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/misc/tests/test_pilutil.py
===================================================================
--- trunk/scipy/misc/tests/test_pilutil.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/misc/tests/test_pilutil.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -48,4 +48,4 @@
 decorate_methods(TestPILUtil, _pilskip)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/ndimage/tests/test_ndimage.py
===================================================================
--- trunk/scipy/ndimage/tests/test_ndimage.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/ndimage/tests/test_ndimage.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -5513,4 +5513,4 @@
 #    return len(result.failures), result.testsRun
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/ndimage/tests/test_registration.py
===================================================================
--- trunk/scipy/ndimage/tests/test_registration.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/ndimage/tests/test_registration.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -186,7 +186,7 @@
 
 if __name__ == "__main__":
     #nose.runmodule()
-    nose.run(argv=['', __file__])
+    run_module_suite()
 
 
 

Modified: trunk/scipy/odr/tests/test_odr.py
===================================================================
--- trunk/scipy/odr/tests/test_odr.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/odr/tests/test_odr.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -311,5 +311,5 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()
 #### EOF #######################################################################

Modified: trunk/scipy/optimize/benchmarks/bench_zeros.py
===================================================================
--- trunk/scipy/optimize/benchmarks/bench_zeros.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/optimize/benchmarks/bench_zeros.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -32,4 +32,4 @@
             print '\n\n'
 
 if __name__ == '__main__' :
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/optimize/tests/test_cobyla.py
===================================================================
--- trunk/scipy/optimize/tests/test_cobyla.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/optimize/tests/test_cobyla.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -18,4 +18,4 @@
         assert_almost_equal(x, [x0, x1], decimal=5)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/optimize/tests/test_nonlin.py
===================================================================
--- trunk/scipy/optimize/tests/test_nonlin.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/optimize/tests/test_nonlin.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -91,4 +91,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/optimize/tests/test_optimize.py
===================================================================
--- trunk/scipy/optimize/tests/test_optimize.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/optimize/tests/test_optimize.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -289,4 +289,4 @@
         assert_array_equal(p0, p0_copy)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/optimize/tests/test_slsqp.py
===================================================================
--- trunk/scipy/optimize/tests/test_slsqp.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/optimize/tests/test_slsqp.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -86,4 +86,4 @@
         assert_array_almost_equal(x,[2,1],decimal=3)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/optimize/tests/test_zeros.py
===================================================================
--- trunk/scipy/optimize/tests/test_zeros.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/optimize/tests/test_zeros.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -31,4 +31,4 @@
 
 
 if __name__ == '__main__' :
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/signal/tests/test_signaltools.py
===================================================================
--- trunk/scipy/signal/tests/test_signaltools.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/signal/tests/test_signaltools.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -56,4 +56,5 @@
                            [2,3,2])
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()
+

Modified: trunk/scipy/signal/tests/test_wavelets.py
===================================================================
--- trunk/scipy/signal/tests/test_wavelets.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/signal/tests/test_wavelets.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -76,4 +76,4 @@
         assert_array_almost_equal(x,y,decimal=2)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/benchmarks/bench_sparse.py
===================================================================
--- trunk/scipy/sparse/benchmarks/bench_sparse.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/benchmarks/bench_sparse.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -315,4 +315,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/linalg/dsolve/tests/test_linsolve.py
===================================================================
--- trunk/scipy/sparse/linalg/dsolve/tests/test_linsolve.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/linalg/dsolve/tests/test_linsolve.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -40,4 +40,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py
===================================================================
--- trunk/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -239,8 +239,9 @@
         exact_eval=d['eval'].astype(typ.upper())
         ind=self.sort_choose(exact_eval,typ,k,which)
         exact_eval=exact_eval[ind]
-        print "exact"
-        print exact_eval
+        if verbose >= 3:
+            print "exact"
+            print exact_eval
 
 
         # compute eigenvalues
@@ -248,7 +249,8 @@
         ind=self.sort_choose(eval,typ,k,which)
         eval=eval[ind]
         evec=evec[:,ind]
-        print eval
+        if verbose >= 3:
+            print eval
         # check eigenvalues
         # check eigenvectors A*evec=eval*evec
         for i in range(k):
@@ -269,4 +271,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py
===================================================================
--- trunk/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/linalg/eigen/arpack/tests/test_speigs.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -50,4 +50,4 @@
 #          94.646308846854879, 95.30841709116271], decimal=11)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py
===================================================================
--- trunk/scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -80,4 +80,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/tests/test_base.py
===================================================================
--- trunk/scipy/sparse/tests/test_base.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/tests/test_base.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -1418,4 +1418,4 @@
         
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/tests/test_construct.py
===================================================================
--- trunk/scipy/sparse/tests/test_construct.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/tests/test_construct.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -205,4 +205,4 @@
                             [6,5,0]])
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/tests/test_spfuncs.py
===================================================================
--- trunk/scipy/sparse/tests/test_spfuncs.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/tests/test_spfuncs.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -102,4 +102,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/sparse/tests/test_sputils.py
===================================================================
--- trunk/scipy/sparse/tests/test_sputils.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/sparse/tests/test_sputils.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -67,4 +67,4 @@
         assert_equal(isdense( np.matrix([1]) ),True)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/special/tests/test_basic.py
===================================================================
--- trunk/scipy/special/tests/test_basic.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/special/tests/test_basic.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -2003,4 +2003,4 @@
         assert_almost_equal(sy3,sphpy,4) #compare correct derivative val. (correct =-system val).
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/special/tests/test_spfun_stats.py
===================================================================
--- trunk/scipy/special/tests/test_spfun_stats.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/special/tests/test_spfun_stats.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -35,4 +35,4 @@
             pass
 
 if __name__ == '__main__':
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/models/tests/test_bspline.py
===================================================================
--- trunk/scipy/stats/models/tests/test_bspline.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/models/tests/test_bspline.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -24,4 +24,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/models/tests/test_formula.py
===================================================================
--- trunk/scipy/stats/models/tests/test_formula.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/models/tests/test_formula.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -314,4 +314,4 @@
         assert_equal(set(ff.termnames()), set(['a', 'b', 'c', 'b*c']))
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/models/tests/test_glm.py
===================================================================
--- trunk/scipy/stats/models/tests/test_glm.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/models/tests/test_glm.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -31,4 +31,4 @@
         self.assertEquals(results.df_resid, 31)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/models/tests/test_regression.py
===================================================================
--- trunk/scipy/stats/models/tests/test_regression.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/models/tests/test_regression.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -42,4 +42,4 @@
         self.assertEquals(results.df_resid, 31)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/models/tests/test_rlm.py
===================================================================
--- trunk/scipy/stats/models/tests/test_rlm.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/models/tests/test_rlm.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -27,4 +27,4 @@
         self.assertEquals(results.df_resid, 31)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/models/tests/test_scale.py
===================================================================
--- trunk/scipy/stats/models/tests/test_scale.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/models/tests/test_scale.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -50,4 +50,4 @@
         self.assertEquals(m.shape, (40,10))
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/models/tests/test_utils.py
===================================================================
--- trunk/scipy/stats/models/tests/test_utils.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/models/tests/test_utils.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -55,4 +55,4 @@
         self.assertRaises(ValueError, utils.StepFunction, x, y)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/morestats.py
===================================================================
--- trunk/scipy/stats/morestats.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/morestats.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -18,6 +18,7 @@
 import futil
 import numpy as sb
 from numpy.testing.decorators import setastest
+import warnings
 
 __all__ = ['find_repeats',
            'bayes_mvs', 'kstat', 'kstatvar', 'probplot', 'ppcc_max', 'ppcc_plot',
@@ -475,9 +476,9 @@
     y = sort(x)
     a,w,pw,ifault = statlib.swilk(y,a[:N/2],init)
     if not ifault in [0,2]:
-        print ifault
+        warnings.warn(str(ifault))
     if N > 5000:
-        print "p-value may not be accurate for N > 5000."
+        warnings.warn("p-value may not be accurate for N > 5000.")
     if reta:
         return w, pw, a
     else:
@@ -616,7 +617,7 @@
     repeats = (len(uxy) != len(xy))
     exact = ((m<55) and (n<55) and not repeats)
     if repeats and ((m < 55)  or (n < 55)):
-        print "Ties preclude use of exact statistic."
+        warnings.warn("Ties preclude use of exact statistic.")
     if exact:
         astart, a1, ifault = statlib.gscale(n,m)
         ind = AB-astart
@@ -972,7 +973,7 @@
     d = compress(not_equal(d,0),d,axis=-1) # Keep all non-zero differences
     count = len(d)
     if (count < 10):
-        print "Warning: sample size too small for normal approximation."
+        warnings.warn("Warning: sample size too small for normal approximation.")
     r = stats.rankdata(abs(d))
     r_plus = sum((d > 0)*r,axis=0)
     r_minus = sum((d < 0)*r,axis=0)

Modified: trunk/scipy/stats/tests/test_distributions.py
===================================================================
--- trunk/scipy/stats/tests/test_distributions.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/tests/test_distributions.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -213,4 +213,4 @@
         assert_equal(stats.expon.pdf(0),1)
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/tests/test_mmorestats.py
===================================================================
--- trunk/scipy/stats/tests/test_mmorestats.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/tests/test_mmorestats.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -100,4 +100,4 @@
 ###############################################################################
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/tests/test_morestats.py
===================================================================
--- trunk/scipy/stats/tests/test_morestats.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/tests/test_morestats.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -111,4 +111,4 @@
         assert_array_equal(nums,[3,3,2,2])
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/tests/test_mstats.py
===================================================================
--- trunk/scipy/stats/tests/test_mstats.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/tests/test_mstats.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -503,4 +503,4 @@
 
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()

Modified: trunk/scipy/stats/tests/test_stats.py
===================================================================
--- trunk/scipy/stats/tests/test_stats.py	2008-07-21 19:02:32 UTC (rev 4556)
+++ trunk/scipy/stats/tests/test_stats.py	2008-07-22 18:51:24 UTC (rev 4557)
@@ -854,4 +854,4 @@
                            [0,2,3,4,0,0,0])
 
 if __name__ == "__main__":
-    nose.run(argv=['', __file__])
+    run_module_suite()




More information about the Scipy-svn mailing list