Commit f27cc5bc authored by Guido van Rossum's avatar Guido van Rossum

Marc-Andre must not have run these tests -- they used verify() but

didn't import it.  Also got rid of some inconsistent spaces inside
parentheses in test_gzip.py.
parent 72264290
from test_support import TestFailed, TESTFN from test_support import TestFailed, TESTFN, verify
# Simple test to ensure that optimizations in fileobject.c deliver # Simple test to ensure that optimizations in fileobject.c deliver
# the expected results. For best testing, run this under a debug-build # the expected results. For best testing, run this under a debug-build
......
# Simple test suite for Cookie.py # Simple test suite for Cookie.py
from test_support import verify
import Cookie import Cookie
# Currently this only tests SimpleCookie # Currently this only tests SimpleCookie
......
from test_support import verify
import sys, os import sys, os
import gzip, tempfile import gzip, tempfile
...@@ -31,7 +32,7 @@ verify(d == (data1*50) + (data2*15)) ...@@ -31,7 +32,7 @@ verify(d == (data1*50) + (data2*15))
f = gzip.GzipFile(filename, 'rb') f = gzip.GzipFile(filename, 'rb')
line_length = 0 line_length = 0
while 1: while 1:
L = f.readline( line_length ) L = f.readline(line_length)
if L == "" and line_length != 0: break if L == "" and line_length != 0: break
verify(len(L) <= line_length) verify(len(L) <= line_length)
line_length = (line_length + 1) % 50 line_length = (line_length + 1) % 50
...@@ -50,4 +51,4 @@ while 1: ...@@ -50,4 +51,4 @@ while 1:
f.close() f.close()
os.unlink( filename ) os.unlink(filename)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment