[Zodb-checkins] CVS: ZODB3/ZODB/tests - StorageTestBase.py:1.17.8.3
Barry Warsaw
barry@wooz.org
Wed, 22 Jan 2003 11:58:18 -0500
Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv21946
Modified Files:
Tag: ZODB3-3_1-branch
StorageTestBase.py
Log Message:
zodb_pickle(): Add persistent_id hack from the head
=== ZODB3/ZODB/tests/StorageTestBase.py 1.17.8.2 => 1.17.8.3 ===
--- ZODB3/ZODB/tests/StorageTestBase.py:1.17.8.2 Fri Dec 6 17:59:30 2002
+++ ZODB3/ZODB/tests/StorageTestBase.py Wed Jan 22 11:58:15 2003
@@ -26,6 +26,7 @@
"""Create a pickle in the format expected by ZODB."""
f = StringIO()
p = Pickler(f, 1)
+ p.persistent_id = lambda obj: getattr(obj, '_p_oid', None)
klass = obj.__class__
assert not hasattr(obj, '__getinitargs__'), "not ready for constructors"
args = None