[Scipy-svn] r6795 - trunk/scipy/ndimage/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Sun Sep 12 17:24:55 EDT 2010


Author: warren.weckesser
Date: 2010-09-12 16:24:55 -0500 (Sun, 12 Sep 2010)
New Revision: 6795

Modified:
   trunk/scipy/ndimage/tests/test_filters.py
   trunk/scipy/ndimage/tests/test_io.py
   trunk/scipy/ndimage/tests/test_ndimage.py
   trunk/scipy/ndimage/tests/test_regression.py
Log:
TST: ndimage: Don't use 'import *'. Don't use plain 'assert'.

Modified: trunk/scipy/ndimage/tests/test_filters.py
===================================================================
--- trunk/scipy/ndimage/tests/test_filters.py	2010-09-12 21:22:23 UTC (rev 6794)
+++ trunk/scipy/ndimage/tests/test_filters.py	2010-09-12 21:24:55 UTC (rev 6795)
@@ -4,8 +4,6 @@
 
 from numpy.testing import assert_equal, assert_raises
 
-from nose.tools import assert_true
-
 import scipy.ndimage as sndi
 
 

Modified: trunk/scipy/ndimage/tests/test_io.py
===================================================================
--- trunk/scipy/ndimage/tests/test_io.py	2010-09-12 21:22:23 UTC (rev 6794)
+++ trunk/scipy/ndimage/tests/test_io.py	2010-09-12 21:24:55 UTC (rev 6795)
@@ -1,4 +1,4 @@
-from numpy.testing import *
+from numpy.testing import assert_array_equal, dec, run_module_suite
 import scipy.ndimage as ndi
 
 import os

Modified: trunk/scipy/ndimage/tests/test_ndimage.py
===================================================================
--- trunk/scipy/ndimage/tests/test_ndimage.py	2010-09-12 21:22:23 UTC (rev 6794)
+++ trunk/scipy/ndimage/tests/test_ndimage.py	2010-09-12 21:24:55 UTC (rev 6795)
@@ -32,7 +32,8 @@
 import numpy
 import numpy as np
 from numpy import fft
-from numpy.testing import *
+from numpy.testing import assert_, assert_equal, assert_array_equal, \
+        TestCase, run_module_suite
 import scipy.ndimage as ndimage
 
 eps = 1e-12
@@ -2118,11 +2119,11 @@
                 arr = numpy.array(range(25)).reshape((5,5)).astype(float)
                 arr = ndimage.zoom(arr, z, order=order)
                 assert_equal(arr.shape,(10,10))
-                assert numpy.all(arr[-1,:] != 0)
-                assert numpy.all(arr[-1,:] >= (20 - eps))
-                assert numpy.all(arr[0,:] <= (5 + eps))
-                assert numpy.all(arr >= (0 - eps))
-                assert numpy.all(arr <= (24 + eps))
+                assert_(numpy.all(arr[-1,:] != 0))
+                assert_(numpy.all(arr[-1,:] >= (20 - eps)))
+                assert_(numpy.all(arr[0,:] <= (5 + eps)))
+                assert_(numpy.all(arr >= (0 - eps)))
+                assert_(numpy.all(arr <= (24 + eps)))
 
     def test_zoom2(self):
         "zoom 2"

Modified: trunk/scipy/ndimage/tests/test_regression.py
===================================================================
--- trunk/scipy/ndimage/tests/test_regression.py	2010-09-12 21:22:23 UTC (rev 6794)
+++ trunk/scipy/ndimage/tests/test_regression.py	2010-09-12 21:24:55 UTC (rev 6795)
@@ -1,5 +1,5 @@
 import numpy as np
-from numpy.testing import *
+from numpy.testing import assert_array_almost_equal, run_module_suite
 
 import scipy.ndimage as ndimage
 




More information about the Scipy-svn mailing list