[pypy-svn] pypy default: (mfoord) test extended slice deletion

mfoord commits-noreply at bitbucket.org
Tue Jan 18 14:01:59 CET 2011


Author: Michael Foord <michael at voidspace.org.uk>
Branch: 
Changeset: r40846:66e12c7d77ed
Date: 2011-01-18 11:51 +0100
http://bitbucket.org/pypy/pypy/changeset/66e12c7d77ed/

Log:	(mfoord) test extended slice deletion

diff --git a/pypy/objspace/std/test/test_bytes.py b/pypy/objspace/std/test/test_bytes.py
--- a/pypy/objspace/std/test/test_bytes.py
+++ b/pypy/objspace/std/test/test_bytes.py
@@ -229,13 +229,17 @@
             b[::2] = 'foo'
         raises(ValueError, set_wrong_size)
 
-    def test_delslice(self):
+    def test_delitem_slice(self):
         b = bytearray('abcdefghi')
         del b[5:8]
         assert b == 'abcdei'
         del b[:3]
         assert b == 'dei'
 
+        b = bytearray('hello world')
+        del b[::2]
+        assert b == bytearray('el ol')
+
     def test_setitem(self):
         b = bytearray('abcdefghi')
         b[1] = 'B'


More information about the Pypy-commit mailing list