[pypy-svn] r34473 - pypy/dist/pypy/objspace/std/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Fri Nov 10 18:05:44 CET 2006
Author: cfbolz
Date: Fri Nov 10 18:05:43 2006
New Revision: 34473
Modified:
pypy/dist/pypy/objspace/std/test/test_userobject.py
Log:
adding gc.collects here as well
Modified: pypy/dist/pypy/objspace/std/test/test_userobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/test/test_userobject.py (original)
+++ pypy/dist/pypy/objspace/std/test/test_userobject.py Fri Nov 10 18:05:43 2006
@@ -143,15 +143,17 @@
assert not hasattr(a, 'x')
def test_del(self):
+ import gc
lst = []
class A(object):
def __del__(self):
lst.append(42)
A()
+ gc.collect()
assert lst == [42]
def test_del_exception(self):
- import sys, StringIO
+ import sys, StringIO, gc
class A(object):
def __del__(self):
yaddadlaouti
@@ -159,8 +161,10 @@
try:
sys.stderr = StringIO.StringIO()
A()
+ gc.collect()
res = sys.stderr.getvalue()
A()
+ gc.collect()
res2 = sys.stderr.getvalue()
finally:
sys.stderr = prev
More information about the Pypy-commit
mailing list