[pypy-svn] rev 2475 - pypy/trunk/src/pypy/objspace/std/test

pmaupin at codespeak.net pmaupin at codespeak.net
Thu Dec 18 11:16:41 CET 2003


Author: pmaupin
Date: Thu Dec 18 11:16:40 2003
New Revision: 2475

Modified:
   pypy/trunk/src/pypy/objspace/std/test/test_listobject.py
Log:
Added extended slice unit tests

Modified: pypy/trunk/src/pypy/objspace/std/test/test_listobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/test/test_listobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/test/test_listobject.py	Thu Dec 18 11:16:40 2003
@@ -292,5 +292,16 @@
         l.extend((2,))
         self.assertEquals(l, [1,2])
 
+    def test_extended_slice(self):
+        l = range(10)
+        del l[::2]
+        self.assertEquals(l,[1,3,5,7,9])
+        l[-2::-1] = l[:-1]
+        self.assertEquals(l,[7,5,3,1,9])
+        del l[-1:2:-1]
+        self.assertEquals(l,[7,5,3])
+        del l[:2]
+        self.assertEquals(l,[3])
+        
 if __name__ == '__main__':
     test.main()


More information about the Pypy-commit mailing list