[Zodb-checkins] CVS: ZODB3/ZEO/tests - test_cache.py:1.1.2.11
Jeremy Hylton
jeremy at zope.com
Tue Dec 23 00:06:52 EST 2003
Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv23690/ZEO/tests
Modified Files:
Tag: ZODB3-mvcc-2-branch
test_cache.py
Log Message:
Fix internal attribute name: dll was renamed to fc at the last minute.
=== ZODB3/ZEO/tests/test_cache.py 1.1.2.10 => 1.1.2.11 ===
--- ZODB3/ZEO/tests/test_cache.py:1.1.2.10 Tue Dec 23 00:03:03 2003
+++ ZODB3/ZEO/tests/test_cache.py Tue Dec 23 00:06:51 2003
@@ -104,8 +104,8 @@
def testEviction(self):
# Manually override the current maxsize
- maxsize = self.cache.size = self.cache.dll.maxsize = 3395 # 1245
- self.cache.dll = ZEO.cache.Cache(3395, None, self.cache)
+ maxsize = self.cache.size = self.cache.fc.maxsize = 3395 # 1245
+ self.cache.fc = ZEO.cache.FileCache(3395, None, self.cache)
# Trivial test of eviction code. Doesn't test non-current
# eviction.
@@ -114,13 +114,13 @@
n = p64(i)
self.cache.store(n, "", n, None, data[i])
self.assertEquals(len(self.cache), i + 1)
- self.assert_(self.cache.dll.currentsize < maxsize)
+ self.assert_(self.cache.fc.currentsize < maxsize)
# The cache now uses 1225 bytes. The next insert
# should delete some objects.
n = p64(50)
self.cache.store(n, "", n, None, data[51])
self.assert_(len(self.cache) < 51)
- self.assert_(self.cache.dll.currentsize <= maxsize)
+ self.assert_(self.cache.fc.currentsize <= maxsize)
# XXX Need to make sure eviction of non-current data
# and of version data are handled correctly.
@@ -135,9 +135,9 @@
# Copy data from self.cache into path, reaching into the cache
# guts to make the copy.
dst = open(path, "wb+")
- src = self.cache.dll.f
+ src = self.cache.fc.f
src.seek(0)
- dst.write(src.read(self.cache.dll.maxsize))
+ dst.write(src.read(self.cache.fc.maxsize))
dst.close()
copy = ZEO.cache.ClientCache(path)
copy.open()
More information about the Zodb-checkins
mailing list