[pypy-svn] r56084 - pypy/branch/async-del/pypy/objspace/std/test
arigo at codespeak.net
arigo at codespeak.net
Thu Jun 26 11:25:39 CEST 2008
Author: arigo
Date: Thu Jun 26 11:25:37 2008
New Revision: 56084
Modified:
pypy/branch/async-del/pypy/objspace/std/test/test_listobject.py
Log:
A test that shows what all this is about.
Modified: pypy/branch/async-del/pypy/objspace/std/test/test_listobject.py
==============================================================================
--- pypy/branch/async-del/pypy/objspace/std/test/test_listobject.py (original)
+++ pypy/branch/async-del/pypy/objspace/std/test/test_listobject.py Thu Jun 26 11:25:37 2008
@@ -737,3 +737,16 @@
# does not crash
l.remove(5)
assert l[10:] == [0, 1, 2, 3, 4, 6, 7, 8, 9]
+
+ def test_mutate_while_extend(self):
+ # this segfaults pypy-c (try py.test -A)
+ class A(object):
+ def __del__(self):
+ print 'del'
+ del lst[:]
+ keepalive = []
+ for i in range(10):
+ lst = list(str(i)) * 100
+ A()
+ while lst:
+ keepalive.append(lst[:])
More information about the Pypy-commit
mailing list