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

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Oct 7 10:05:10 CDT 2006


Author: stefan
Date: 2006-10-07 10:04:51 -0500 (Sat, 07 Oct 2006)
New Revision: 3286

Modified:
   trunk/numpy/lib/tests/test_function_base.py
Log:
Add test for insert.


Modified: trunk/numpy/lib/tests/test_function_base.py
===================================================================
--- trunk/numpy/lib/tests/test_function_base.py	2006-10-07 14:52:08 UTC (rev 3285)
+++ trunk/numpy/lib/tests/test_function_base.py	2006-10-07 15:04:51 UTC (rev 3286)
@@ -93,6 +93,13 @@
         t3 = linspace(0,1,2).dtype
         assert_equal(t1, t2)
         assert_equal(t2, t3)
+        
+class test_insert(NumpyTestCase):
+    def check_basic(self):
+        a = [1,2,3]
+        assert_equal(insert(a,0,1), [1,1,2,3])
+        assert_equal(insert(a,3,1), [1,2,3,1])
+        assert_equal(insert(a,[1,1,1],[1,2,3]), [1,1,2,3,2,3])
 
 class test_amax(NumpyTestCase):
     def check_basic(self):



More information about the Numpy-svn mailing list