summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-09-18 21:04:31 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-09-18 21:04:31 +0000
commit29cb5ffae98ad43a3e7ebada8dc77ce0a4045529 (patch)
tree8f5d8deac5acc469eaf1f6299059255f29e704bc /numpy
parentab1d154233006e561157ab8c89ab02aafb6c1997 (diff)
downloadnumpy-29cb5ffae98ad43a3e7ebada8dc77ce0a4045529.tar.gz
Add tests for recent void byteswap problem.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_regression.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py
index 81079b5b5..7d1ed992b 100644
--- a/numpy/core/tests/test_regression.py
+++ b/numpy/core/tests/test_regression.py
@@ -405,6 +405,12 @@ class test_regression(NumpyTestCase):
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()