Whitespace normalization.

This commit is contained in:
Tim Peters 2001-03-29 04:36:09 +00:00
parent 301ab7f2d0
commit a19a168ccc
7 changed files with 23 additions and 23 deletions

View file

@ -10,12 +10,12 @@ def zipTest(f, compression, srccontents):
zip.write(srcname, "another.name")
zip.write(srcname, srcname)
zip.close()
zip = zipfile.ZipFile(f, "r", compression) # Read the ZIP archive
readData2 = zip.read(srcname)
readData1 = zip.read("another.name")
zip.close()
if readData1 != srccontents or readData2 != srccontents:
raise TestFailed, "Written data doesn't equal read data."
@ -25,11 +25,11 @@ try:
for i in range(0, 1000):
fp.write("Test of zipfile line %d.\n" % i)
fp.close()
fp = open(srcname, "rb")
writtenData = fp.read()
fp.close()
for file in (zipname, tempfile.TemporaryFile(), StringIO.StringIO()):
zipTest(file, zipfile.ZIP_STORED, writtenData)