we're not always supposed to gzip test_file in web_server.py (unit test)

This commit is contained in:
Arvid Norberg 2014-01-22 04:05:23 +00:00
parent 8bf283c7fe
commit ad635c7081
1 changed files with 8 additions and 5 deletions

View File

@ -7,11 +7,14 @@ import gzip
chunked_encoding = False chunked_encoding = False
fin = open('test_file', 'rb') try:
f = gzip.open('test_file.gz', 'wb') fin = open('test_file', 'rb')
f.writelines(fin) f = gzip.open('test_file.gz', 'wb')
f.close() f.writelines(fin)
fin.close() f.close()
fin.close()
except:
pass
class http_server_with_timeout(BaseHTTPServer.HTTPServer): class http_server_with_timeout(BaseHTTPServer.HTTPServer):
allow_reuse_address = True allow_reuse_address = True