Lines Matching refs:compression
56 def make_test_archive(self, f, compression, compresslevel=None): argument
57 kwargs = {'compression': compression, 'compresslevel': compresslevel}
67 def zip_test(self, f, compression, compresslevel=None): argument
68 self.make_test_archive(f, compression, compresslevel)
71 with zipfile.ZipFile(f, "r", compression) as zipfp:
123 self.zip_test(f, self.compression)
125 def zip_open_test(self, f, compression): argument
126 self.make_test_archive(f, compression)
129 with zipfile.ZipFile(f, "r", compression) as zipfp:
151 self.zip_open_test(f, self.compression)
155 self.zip_open_test(path, self.compression)
156 with zipfile.ZipFile(path, "r", self.compression) as zipfp:
159 def zip_random_open_test(self, f, compression): argument
160 self.make_test_archive(f, compression)
163 with zipfile.ZipFile(f, "r", compression) as zipfp:
176 self.zip_random_open_test(f, self.compression)
178 def zip_read1_test(self, f, compression): argument
179 self.make_test_archive(f, compression)
195 self.zip_read1_test(f, self.compression)
197 def zip_read1_10_test(self, f, compression): argument
198 self.make_test_archive(f, compression)
215 self.zip_read1_10_test(f, self.compression)
217 def zip_readline_read_test(self, f, compression): argument
218 self.make_test_archive(f, compression)
240 self.zip_readline_read_test(f, self.compression)
242 def zip_readline_test(self, f, compression): argument
243 self.make_test_archive(f, compression)
254 self.zip_readline_test(f, self.compression)
256 def zip_readlines_test(self, f, compression): argument
257 self.make_test_archive(f, compression)
268 self.zip_readlines_test(f, self.compression)
270 def zip_iterlines_test(self, f, compression): argument
271 self.make_test_archive(f, compression)
281 self.zip_iterlines_test(f, self.compression)
286 with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipfp:
290 with zipfile.ZipFile(TESTFN2, "r", self.compression) as zipfp:
297 zipfp.writestr("b.txt", "hello world", compress_type=self.compression)
299 self.assertEqual(info.compress_type, self.compression)
303 zipfp.writestr("a.txt", "hello world", compress_type=self.compression)
304 zipfp.writestr("b.txt", "hello world", compress_type=self.compression,
309 self.assertEqual(a_info.compress_type, self.compression)
314 self.assertEqual(b_info.compress_type, self.compression)
323 with zipfile.ZipFile(io.BytesIO(), "w", self.compression) as zipf:
332 zipf.writestr('strfile', self.data, compress_type=self.compression)
362 with zipfile.ZipFile(f, 'w', self.compression) as zipfp:
378 if self.compression != zipfile.ZIP_STORED:
385 if self.compression != zipfile.ZIP_STORED:
392 self.zip_test(f, self.compression, compresslevel=9)
412 compression = zipfile.ZIP_STORED variable in StoredTestsWithSourceFile
415 def zip_test_writestr_permissions(self, f, compression): argument
420 self.make_test_archive(f, compression)
556 compression = zipfile.ZIP_DEFLATED variable in DeflateTestsWithSourceFile
572 compression = zipfile.ZIP_BZIP2 variable in Bzip2TestsWithSourceFile
577 compression = zipfile.ZIP_LZMA variable in LzmaTestsWithSourceFile
600 def zip_test(self, f, compression): argument
602 with zipfile.ZipFile(f, "w", compression, allowZip64=True) as zipfp:
608 with zipfile.ZipFile(f, "r", compression) as zipfp:
659 self.zip_test(f, self.compression)
664 zipf = zipfile.ZipFile(TESTFN, "w", self.compression,
673 zipf2 = zipfile.ZipFile(TESTFN, "r", self.compression)
681 zipf = zipfile.ZipFile(TESTFN, "w", self.compression,
693 zipf = zipfile.ZipFile(TESTFN, "a", self.compression,
702 zipf = zipfile.ZipFile(TESTFN, "a", self.compression,
712 zipf2 = zipfile.ZipFile(TESTFN, "r", self.compression)
728 compression = zipfile.ZIP_STORED variable in StoredTestZip64InSmallFiles
730 def large_file_exception_test(self, f, compression): argument
731 with zipfile.ZipFile(f, "w", compression, allowZip64=False) as zipfp:
735 def large_file_exception_test2(self, f, compression): argument
736 with zipfile.ZipFile(f, "w", compression, allowZip64=False) as zipfp:
770 compression = zipfile.ZIP_DEFLATED variable in DeflateTestZip64InSmallFiles
775 compression = zipfile.ZIP_BZIP2 variable in Bzip2TestZip64InSmallFiles
780 compression = zipfile.ZIP_LZMA variable in LzmaTestZip64InSmallFiles
790 with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipf:
801 with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipf:
810 compression = zipfile.ZIP_STORED variable in StoredWriterTests
814 compression = zipfile.ZIP_DEFLATED variable in DeflateWriterTests
818 compression = zipfile.ZIP_BZIP2 variable in Bzip2WriterTests
822 compression = zipfile.ZIP_LZMA variable in LzmaWriterTests
1720 compression = zipfile.ZIP_STORED variable in StoredBadCrcTests
1733 compression = zipfile.ZIP_DEFLATED variable in DeflateBadCrcTests
1746 compression = zipfile.ZIP_BZIP2 variable in Bzip2BadCrcTests
1762 compression = zipfile.ZIP_LZMA variable in LzmaBadCrcTests
1856 def make_test_archive(self, f, compression): argument
1858 with zipfile.ZipFile(f, "w", compression) as zipfp:
1862 def zip_test(self, f, compression): argument
1863 self.make_test_archive(f, compression)
1866 with zipfile.ZipFile(f, "r", compression) as zipfp:
1874 self.zip_test(f, self.compression)
1876 def zip_open_test(self, f, compression): argument
1877 self.make_test_archive(f, compression)
1880 with zipfile.ZipFile(f, "r", compression) as zipfp:
1907 self.zip_open_test(f, self.compression)
1909 def zip_random_open_test(self, f, compression): argument
1910 self.make_test_archive(f, compression)
1913 with zipfile.ZipFile(f, "r", compression) as zipfp:
1928 self.zip_random_open_test(f, self.compression)
1933 compression = zipfile.ZIP_STORED variable in StoredTestsWithRandomBinaryFiles
1938 compression = zipfile.ZIP_DEFLATED variable in DeflateTestsWithRandomBinaryFiles
1943 compression = zipfile.ZIP_BZIP2 variable in Bzip2TestsWithRandomBinaryFiles
1948 compression = zipfile.ZIP_LZMA variable in LzmaTestsWithRandomBinaryFiles