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

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Sep 18 16:04:35 CDT 2006


Author: oliphant
Date: 2006-09-18 16:04:31 -0500 (Mon, 18 Sep 2006)
New Revision: 3181

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Add tests for recent void byteswap problem.

Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2006-09-18 20:50:10 UTC (rev 3180)
+++ trunk/numpy/core/tests/test_regression.py	2006-09-18 21:04:31 UTC (rev 3181)
@@ -405,6 +405,12 @@
         dt = N.dtype([('a','f4'),('b','i4')])
         x = N.zeros((1,),dt)
         assert(N.r_[x,x].dtype == dt)
+
+    def check_void_copyswap(self, level=rlevel):
+        dt = N.dtype([('one', '<i4'),('two', '<i4')])
+        x = N.array((1,2), dtype=dt)
+        x = x.byteswap()
+        assert(x['one'] > 1 and x['two'] > 2)
         
 if __name__ == "__main__":
     NumpyTest().run()



More information about the Numpy-svn mailing list