[pypy-svn] r59552 - pypy/trunk/lib-python/modified-2.5.2/test
arigo at codespeak.net
arigo at codespeak.net
Thu Oct 30 12:59:34 CET 2008
Author: arigo
Date: Thu Oct 30 12:59:34 2008
New Revision: 59552
Modified:
pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py
Log:
Mark as "detail" a test that relies on the fact
that __del__ is called again on the same instance,
after resurrection.
Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py (original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py Thu Oct 30 12:59:34 2008
@@ -3654,10 +3654,14 @@
# If that didn't blow up, it's also interesting to see whether clearing
# the last container slot works: that will attempt to delete c again,
# which will cause c to get appended back to the container again "during"
- # the del.
- del C.container[-1]
+ # the del. On non-CPython implementations, however, __del__ is not
+ # called again.
+ gc_collect()
vereq(len(C.container), 1)
- vereq(C.container[-1].attr, 42)
+ del C.container[-1]
+ if check_impl_detail:
+ vereq(len(C.container), 1)
+ vereq(C.container[-1].attr, 42)
# Make c mortal again, so that the test framework with -l doesn't report
# it as a leak.
More information about the Pypy-commit
mailing list