[pypy-commit] pypy list-strategies: Unvisited path: Added test and fixed error
l.diekmann
noreply at buildbot.pypy.org
Fri Sep 23 13:12:26 CEST 2011
Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: list-strategies
Changeset: r47467:8efc606bcbbe
Date: 2011-03-15 17:54 +0100
http://bitbucket.org/pypy/pypy/changeset/8efc606bcbbe/
Log: Unvisited path: Added test and fixed error
diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -502,7 +502,7 @@
else:
assert delta==0 # start<0 is only possible with slicelength==0
elif len2 != slicelength: # No resize for extended slices
- raise operationerrfmt(space.w_ValueError, "attempt to "
+ raise operationerrfmt(self.space.w_ValueError, "attempt to "
"assign sequence of size %d to extended slice of size %d",
len2, slicelength)
diff --git a/pypy/objspace/std/test/test_listobject.py b/pypy/objspace/std/test/test_listobject.py
--- a/pypy/objspace/std/test/test_listobject.py
+++ b/pypy/objspace/std/test/test_listobject.py
@@ -638,6 +638,9 @@
assert l == [0, 'b', 2]
assert l is l0
+ l = [1,2,3]
+ raises(ValueError, "l[0:2:2] = [1,2,3,4]")
+
def test_recursive_repr(self):
l = []
assert repr(l) == '[]'
More information about the pypy-commit
mailing list