[Scipy-svn] r6798 - trunk/scipy/signal/tests

scipy-svn@scip... scipy-svn@scip...
Sun Sep 12 16:27:22 CDT 2010


Author: warren.weckesser
Date: 2010-09-12 16:27:21 -0500 (Sun, 12 Sep 2010)
New Revision: 6798

Modified:
   trunk/scipy/signal/tests/test_signaltools.py
   trunk/scipy/signal/tests/test_wavelets.py
Log:
TST: signal: Don't use plain 'assert'.

Modified: trunk/scipy/signal/tests/test_signaltools.py
===================================================================
--- trunk/scipy/signal/tests/test_signaltools.py	2010-09-12 21:26:17 UTC (rev 6797)
+++ trunk/scipy/signal/tests/test_signaltools.py	2010-09-12 21:27:21 UTC (rev 6798)
@@ -1,10 +1,9 @@
 #this program corresponds to special.py
 from decimal import Decimal
-import types
 
 from numpy.testing import TestCase, run_module_suite, assert_equal, \
     assert_almost_equal, assert_array_equal, assert_array_almost_equal, \
-    dec
+    assert_, dec
 
 import scipy.signal as signal
 from scipy.signal import lfilter, correlate, convolve, convolve2d, hilbert
@@ -255,7 +254,7 @@
         b = np.random.rand(1321) + 1j*np.random.rand(1321)
         c = signal.fftconvolve(a, b, 'full')
         d = np.convolve(a, b, 'full')
-        assert np.allclose(c, d, rtol=1e-10)
+        assert_(np.allclose(c, d, rtol=1e-10))
 
 class TestMedFilt(TestCase):
     def test_basic(self):

Modified: trunk/scipy/signal/tests/test_wavelets.py
===================================================================
--- trunk/scipy/signal/tests/test_wavelets.py	2010-09-12 21:26:17 UTC (rev 6797)
+++ trunk/scipy/signal/tests/test_wavelets.py	2010-09-12 21:27:21 UTC (rev 6798)
@@ -1,6 +1,6 @@
 import numpy as np
 from numpy.testing import TestCase, run_module_suite, assert_equal, \
-    assert_array_equal, assert_array_almost_equal, assert_array_less
+    assert_array_equal, assert_array_almost_equal, assert_array_less, assert_
 
 from scipy.signal import wavelets
 
@@ -19,7 +19,7 @@
                 lpcoef = wavelets.daub(i)
                 k = len(lpcoef)
                 x,phi,psi = wavelets.cascade(lpcoef,J)
-                assert len(x) == len(phi) == len(psi)
+                assert_(len(x) == len(phi) == len(psi))
                 assert_equal(len(x),(k-1)*2**J)
 
     def test_morlet(self):



More information about the Scipy-svn mailing list