Home | History | Annotate | Download | only in test

Lines Matching defs:gzip

2 """Test script for the gzip module.
10 gzip = test_support.import_module('gzip')
19 data2 = """/* zlibmodule.c -- gzip-compatible data compression */
20 /* See http://www.gzip.org/zlib/
36 with gzip.GzipFile(self.filename, 'wb') as f:
52 with gzip.GzipFile(self.filename, 'r') as f:
59 with gzip.GzipFile(self.filename, 'rU') as f:
69 f = gzip.GzipFile(self.filename, 'r')
78 f = gzip.GzipFile(self.filename, 'w')
88 with gzip.GzipFile(self.filename, 'ab') as f:
91 with gzip.GzipFile(self.filename, 'rb') as f:
99 with gzip.open(self.filename, 'wb', 9) as f:
102 with gzip.open(self.filename, "ab", 9) as f: # append
106 with gzip.open(self.filename, "rb") as zgfile:
119 with gzip.GzipFile(self.filename, 'rb') as f:
129 with gzip.GzipFile(self.filename, 'rb') as f:
141 with gzip.GzipFile(self.filename, 'rb') as f:
144 with gzip.GzipFile(self.filename, 'rb') as f:
153 with gzip.GzipFile(self.filename) as f:
172 with gzip.GzipFile(self.filename) as f:
180 with gzip.GzipFile(self.filename, 'w') as f:
187 with gzip.GzipFile(self.filename, 'r') as f:
192 with gzip.GzipFile(self.filename, mode) as f:
198 with gzip.GzipFile(self.filename, 'w', mtime = mtime) as fWrite:
200 with gzip.GzipFile(self.filename) as fRead:
209 with gzip.GzipFile(self.filename, 'w', mtime = mtime) as fWrite:
216 self.assertEqual(idBytes, '\x1f\x8b') # gzip ID
235 # However, the gzip module defaults to storing the name of the output
253 with gzip.GzipFile(self.filename, "wb") as f:
255 f = gzip.GzipFile(self.filename, "rb")
265 with gzip.GzipFile(self.filename, "wb") as f:
273 with gzip.GzipFile(self.filename, "wb") as f:
280 with gzip.GzipFile(self.filename, "rb") as f:
289 with gzip.GzipFile(fileobj=f, mode="w") as g:
293 # Gzip data with an extra field
297 with gzip.GzipFile(fileobj=io.BytesIO(gzdata)) as f: