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
fin = open('test_file', 'rb')
f = gzip.open('test_file.gz', 'wb')
f.writelines(fin)
f.close()
fin.close()
try:
fin = open('test_file', 'rb')
f = gzip.open('test_file.gz', 'wb')
f.writelines(fin)
f.close()
fin.close()
except:
pass
class http_server_with_timeout(BaseHTTPServer.HTTPServer):
allow_reuse_address = True