[Scipy-svn] r6607 - branches/0.8.x/scipy/fftpack/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Jul 14 06:29:46 EDT 2010


Author: ptvirtan
Date: 2010-07-14 05:29:46 -0500 (Wed, 14 Jul 2010)
New Revision: 6607

Modified:
   branches/0.8.x/scipy/fftpack/tests/test_basic.py
Log:
BUG: fftpack/tests: fix spurious failures on machines where double==longdouble (fixes #1229)

Thanks to Christoph Gohlke.

(cherry picked from commit r6604)

Modified: branches/0.8.x/scipy/fftpack/tests/test_basic.py
===================================================================
--- branches/0.8.x/scipy/fftpack/tests/test_basic.py	2010-07-14 09:29:10 UTC (rev 6606)
+++ branches/0.8.x/scipy/fftpack/tests/test_basic.py	2010-07-14 10:29:46 UTC (rev 6607)
@@ -601,7 +601,12 @@
     maxnlp = 3500
 
 class TestLongDoubleFailure(TestCase):
+
     def test_complex(self):
+        if np.dtype(np.longcomplex).itemsize == np.dtype(np.complex).itemsize:
+            # longdouble == double; so fft is supported
+            return
+
         x = np.random.randn(10).astype(np.longdouble) + \
                 1j * np.random.randn(10).astype(np.longdouble)
 
@@ -614,6 +619,10 @@
                 pass
 
     def test_real(self):
+        if np.dtype(np.longdouble).itemsize == np.dtype(np.double).itemsize:
+            # longdouble == double; so fft is supported
+            return
+
         x = np.random.randn(10).astype(np.longcomplex)
 
         for f in [fft, ifft]:




More information about the Scipy-svn mailing list