[Numpy-svn] r5025 - trunk/numpy/lib/tests

numpy-svn@scip... numpy-svn@scip...
Fri Apr 11 22:12:17 CDT 2008


Author: rkern
Date: 2008-04-11 22:12:09 -0500 (Fri, 11 Apr 2008)
New Revision: 5025

Modified:
   trunk/numpy/lib/tests/test_io.py
Log:
Compare against native-endian types, not endian-specific types.

Modified: trunk/numpy/lib/tests/test_io.py
===================================================================
--- trunk/numpy/lib/tests/test_io.py	2008-04-11 07:08:13 UTC (rev 5024)
+++ trunk/numpy/lib/tests/test_io.py	2008-04-12 03:12:09 UTC (rev 5025)
@@ -24,7 +24,7 @@
         assert(c.readlines(), ['1\n', '2\n', '3\n', '4\n'])
     
     def test_record(self):
-        a = np.array([(1, 2), (3, 4)], dtype=[('x', '<i4'), ('y', '<i4')])
+        a = np.array([(1, 2), (3, 4)], dtype=[('x', 'i4'), ('y', 'i4')])
         c = StringIO.StringIO()
         np.savetxt(c, a, fmt='%d')
         c.seek(0)
@@ -38,7 +38,7 @@
         c.write('1 2\n3 4')
         c.seek(0)
         x = np.loadtxt(c, dtype=[('x', np.int32), ('y', np.int32)])
-        a = np.array([(1, 2), (3, 4)], dtype=[('x', '<i4'), ('y', '<i4')])
+        a = np.array([(1, 2), (3, 4)], dtype=[('x', 'i4'), ('y', 'i4')])
         assert_array_equal(x, a)
         
         d = StringIO.StringIO()



More information about the Numpy-svn mailing list