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

numpy-svn@scip... numpy-svn@scip...
Fri Jun 27 00:26:27 CDT 2008


Author: charris
Date: 2008-06-27 00:26:25 -0500 (Fri, 27 Jun 2008)
New Revision: 5318

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Add regression test for #825.


Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2008-06-26 23:06:13 UTC (rev 5317)
+++ trunk/numpy/core/tests/test_regression.py	2008-06-27 05:26:25 UTC (rev 5318)
@@ -1152,6 +1152,14 @@
         b = np.array(['1','2','3'])
         assert_equal(a,b)
 
+    def test_unaligned_unicode_access(self, level=rlevel) :
+        """Ticket #825"""
+        for i in range(1,9) :
+            msg = 'unicode offset: %d chars'%i
+            t = np.dtype([('a','S%d'%i),('b','U2')])
+            x = np.array([('a',u'b')], dtype=t)
+            assert_equal(str(x), "[('a', u'b')]", err_msg=msg)
 
+
 if __name__ == "__main__":
     run_module_suite()



More information about the Numpy-svn mailing list