[Numpy-svn] r6263 - trunk/numpy/core/tests

numpy-svn@scip... numpy-svn@scip...
Tue Dec 30 00:01:41 CST 2008


Author: cdavid
Date: 2008-12-30 00:01:31 -0600 (Tue, 30 Dec 2008)
New Revision: 6263

Modified:
   trunk/numpy/core/tests/test_print.py
Log:
More fixes for print tests.

Modified: trunk/numpy/core/tests/test_print.py
===================================================================
--- trunk/numpy/core/tests/test_print.py	2008-12-30 05:54:33 UTC (rev 6262)
+++ trunk/numpy/core/tests/test_print.py	2008-12-30 06:01:31 UTC (rev 6263)
@@ -5,9 +5,17 @@
 import sys
 from StringIO import StringIO
 
-_REF = {np.inf: 'inf', -np.inf: '-inf', np.nan: 'nan', complex(np.inf, 1):
-        '(inf+1j)', complex(np.nan, 1): '(nan+1j)', complex(-np.inf, 1):
-        '(-inf+1j)'}
+_REF = {np.inf: 'inf', -np.inf: '-inf', np.nan: 'nan',
+        np.complex64(np.inf, 1): '(inf+1j)',
+        np.complex64(np.nan, 1): '(nan+1j)',
+        np.complex64(-np.inf, 1): '(-inf+1j)'
+        np.cdouble(np.inf, 1): '(inf+1j)',
+        np.cdouble(np.nan, 1): '(nan+1j)',
+        np.cdouble(-np.inf, 1): '(-inf+1j)'
+        np.clongdouble(np.inf, 1): '(inf+1j)',
+        np.clongdouble(np.nan, 1): '(nan+1j)',
+        np.clongdouble(-np.inf, 1): '(-inf+1j)'
+        }
 
 if sys.platform == 'win32' and sys.version_info[0] <= 2 and sys.version_info[1] <= 5:
     _REF[np.float32(1e10)] = '1e+010'
@@ -89,8 +97,8 @@
         sys.stdout = file_tp
         print tp(x)
         sys.stdout = file
-        if x in _REF:
-            print _REF[x]
+        if tp(x) in _REF:
+            print _REF[tp(x)]
         else:
             print x
     finally:



More information about the Numpy-svn mailing list