Home | History | Annotate | Download | only in test

Lines Matching full:gzip

1 """Test script for the gzip module.
9 gzip = test_support.import_module('gzip')
18 data2 = """/* zlibmodule.c -- gzip-compatible data compression */
19 /* See http://www.gzip.org/zlib/
35 with gzip.GzipFile(self.filename, 'w'+mode) as f:
38 with gzip.GzipFile(self.filename, 'r'+mode) as f:
49 with gzip.GzipFile(unicode_filename, "wb") as f:
51 with gzip.GzipFile(unicode_filename, "rb") as f:
55 gzip.GzipFile(fileobj=fobj, mode="rb") as f:
59 with gzip.GzipFile(self.filename, 'wb') as f:
82 with gzip.GzipFile(self.filename, 'wb') as f:
88 with gzip.GzipFile(self.filename, 'rb') as f:
94 with gzip.GzipFile(self.filename, 'r') as f:
101 with gzip.GzipFile(self.filename, 'rU') as f:
111 f = gzip.GzipFile(self.filename, 'r')
120 f = gzip.GzipFile(self.filename, 'w')
130 with gzip.GzipFile(self.filename, 'ab') as f:
133 with gzip.GzipFile(self.filename, 'rb') as f:
141 with gzip.open(self.filename, 'wb', 9) as f:
144 with gzip.open(self.filename, "ab", 9) as f: # append
148 with gzip.open(self.filename, "rb") as zgfile:
161 with gzip.GzipFile(self.filename, 'rb') as f:
171 with gzip.GzipFile(self.filename, 'rb') as f:
183 with gzip.GzipFile(self.filename, 'rb') as f:
186 with gzip.GzipFile(self.filename, 'rb') as f:
195 with gzip.GzipFile(self.filename) as f:
214 with gzip.GzipFile(self.filename) as f:
222 with gzip.GzipFile(self.filename, 'w') as f:
229 with gzip.GzipFile(self.filename, 'r') as f:
234 with gzip.GzipFile(self.filename, mode) as f:
240 with gzip.GzipFile(self.filename, 'w', mtime = mtime) as fWrite:
242 with gzip.GzipFile(self.filename) as fRead:
251 with gzip.GzipFile(self.filename, 'w', mtime = mtime) as fWrite:
258 self.assertEqual(idBytes, '\x1f\x8b') # gzip ID
277 # However, the gzip module defaults to storing the name of the output
295 with gzip.GzipFile(self.filename, "wb") as f:
297 f = gzip.GzipFile(self.filename, "rb")
307 with gzip.GzipFile(self.filename, "wb") as f:
315 with gzip.GzipFile(self.filename, "wb") as f:
322 with gzip.GzipFile(self.filename, "rb") as f:
331 with gzip.GzipFile(fileobj=f, mode="w") as g:
335 # Gzip data with an extra field
339 with gzip.GzipFile(fileobj=io.BytesIO(gzdata)) as f: