[Zodb-checkins] CVS: Zope3/src/zodb/storage/tests - base.py:1.13
Jeremy Hylton
jeremy@zope.com
Tue, 1 Apr 2003 15:21:42 -0500
Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv14352/storage/tests
Modified Files:
base.py
Log Message:
Close ObjecWriter() to avoid uncollectable cycle.
=== Zope3/src/zodb/storage/tests/base.py 1.12 => 1.13 ===
--- Zope3/src/zodb/storage/tests/base.py:1.12 Fri Mar 14 14:41:17 2003
+++ Zope3/src/zodb/storage/tests/base.py Tue Apr 1 15:21:41 2003
@@ -50,7 +50,10 @@
def zodb_pickle(obj):
"""Create a pickle in the format expected by ZODB."""
- return ObjectWriter(obj._p_jar).getState(obj)
+ w = ObjectWriter(obj._p_jar)
+ state = w.getState(obj)
+ w.close()
+ return state
def zodb_unpickle(data):
"""Unpickle an object stored using the format expected by ZODB."""