[Zope3-checkins] CVS: Zope3/src/ZODB/tests - testCache.py:1.23.2.1
Martijn Faassen
m.faassen at vet.uu.nl
Tue May 11 05:11:28 EDT 2004
Update of /cvs-repository/Zope3/src/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv20906/src/ZODB/tests
Modified Files:
Tag: faassen-interfaces-branch
testCache.py
Log Message:
Sync up with changes in HEAD (so I can generate up to date patch file).
=== Zope3/src/ZODB/tests/testCache.py 1.23 => 1.23.2.1 ===
--- Zope3/src/ZODB/tests/testCache.py:1.23 Mon Apr 19 17:19:07 2004
+++ Zope3/src/ZODB/tests/testCache.py Tue May 11 05:09:58 2004
@@ -205,7 +205,7 @@
# XXX The above gc.collect call is necessary to make this test
# pass.
#
- # This test then only works because the other of computations
+ # This test then only works because the order of computations
# and object accesses in the "noodle" calls is such that the
# persistent mapping containing the MinPO objects is
# deactivated before the MinPO objects.
@@ -230,12 +230,15 @@
self.assertEqual(count, CONNS)
for details in self.db.cacheExtremeDetail():
- # one dict per object. keys:
+ # one 'details' dict per object
if details['klass'].endswith('PersistentMapping'):
self.assertEqual(details['state'], None)
else:
self.assert_(details['klass'].endswith('MinPO'))
self.assertEqual(details['state'], 0)
+ # The cache should never hold an unreferenced ghost.
+ if details['state'] is None: # i.e., it's a ghost
+ self.assert_(details['rc'] > 0)
class StubDataManager:
def setklassstate(self, object):
More information about the Zope3-Checkins
mailing list