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

numpy-svn@scip... numpy-svn@scip...
Fri Aug 29 07:58:44 CDT 2008


Author: oliphant
Date: 2008-08-29 07:58:42 -0500 (Fri, 29 Aug 2008)
New Revision: 5726

Modified:
   trunk/numpy/core/tests/test_regression.py
Log:
Add test for ticket #882 fix.

Modified: trunk/numpy/core/tests/test_regression.py
===================================================================
--- trunk/numpy/core/tests/test_regression.py	2008-08-29 12:47:34 UTC (rev 5725)
+++ trunk/numpy/core/tests/test_regression.py	2008-08-29 12:58:42 UTC (rev 5726)
@@ -1204,5 +1204,10 @@
         assert c.dtype == object
         assert d.dtype == object
 
+    def test_for_zero_length_in_choose(self, level=rlevel):
+        "Ticket #882"
+        a = np.array(1)
+        self.failUnlessRaises(ValueError, lambda x: x.choose([]), a)
+
 if __name__ == "__main__":
     run_module_suite()



More information about the Numpy-svn mailing list