[Zope-Checkins] CVS: Zope/lib/python/OFS/tests - testRanges.py:1.15
Martijn Pieters
mj@zope.com
Wed, 13 Nov 2002 14:17:45 -0500
Update of /cvs-repository/Zope/lib/python/OFS/tests
In directory cvs.zope.org:/tmp/cvs-serv23953/lib/python/OFS/tests
Modified Files:
testRanges.py
Log Message:
Fix for Collector issue #671: PData chains are of equal length, except the
*first* entry (and not the last one as assumed before).
- Adjust test to create a big file that will have a Pdata entry of smaller
size
- Fix pdata_map lookups with first-entry-size in mind.
=== Zope/lib/python/OFS/tests/testRanges.py 1.14 => 1.15 ===
--- Zope/lib/python/OFS/tests/testRanges.py:1.14 Wed Aug 21 17:17:58 2002
+++ Zope/lib/python/OFS/tests/testRanges.py Wed Nov 13 14:17:44 2002
@@ -33,7 +33,8 @@
def createBigFile():
# Create a file that is several 1<<16 blocks of data big, to force the
# use of chained Pdata objects.
- size = (1<<16) * 5
+ # Make sure we create a file that isn't of x * 1<<16 length! Coll #671
+ size = (1<<16) * 5 + 12345
file = cStringIO.StringIO()
def addLetter(x, add=file.write, l=string.letters,