Lines Matching refs:self
46 def _verify(self, zip_file, zip_file_name, arcname, contents, argument
52 self.assertEqual(int(expected_stat.st_mode), int(new_stat.st_mode))
53 self.assertEqual(int(expected_stat.st_mtime), int(new_stat.st_mtime))
60 self.assertEqual(info.date_time, (2009, 1, 1, 0, 0, 0))
64 self.assertEqual(mode, expected_mode)
67 self.assertEqual(info.compress_type, expected_compress_type)
70 self.assertEqual(zip_file.read(arcname), contents)
71 self.assertIsNone(zip_file.testzip())
73 def _test_ZipWrite(self, contents, extra_zipwrite_args=None): argument
103 self._verify(zip_file, zip_file_name, arcname, contents, test_file_name,
109 def _test_ZipWriteStr(self, zinfo_or_arcname, contents, extra_args=None): argument
134 self._verify(zip_file, zip_file_name, arcname, contents,
140 def _test_ZipWriteStr_large_file(self, large, small, extra_args=None): argument
174 self._verify(zip_file, zip_file_name, arcname_large, large,
179 self._verify(zip_file, zip_file_name, arcname_small, small,
185 def _test_reset_ZIP64_LIMIT(self, func, *args): argument
187 self.assertEqual(default_limit, zipfile.ZIP64_LIMIT)
189 self.assertEqual(default_limit, zipfile.ZIP64_LIMIT)
191 def test_ZipWrite(self): argument
193 self._test_ZipWrite(file_contents)
195 def test_ZipWrite_with_opts(self): argument
197 self._test_ZipWrite(file_contents, {
202 self._test_ZipWrite(file_contents, {
208 def test_ZipWrite_large_file(self): argument
210 self._test_ZipWrite(file_contents, {
214 def test_ZipWrite_resets_ZIP64_LIMIT(self): argument
215 self._test_reset_ZIP64_LIMIT(self._test_ZipWrite, "")
217 def test_ZipWriteStr(self): argument
220 self._test_ZipWriteStr("foo", random_string)
224 self._test_ZipWriteStr(zinfo, random_string)
228 self._test_ZipWriteStr(zinfo, random_string)
230 def test_ZipWriteStr_with_opts(self): argument
233 self._test_ZipWriteStr("foo", random_string, {
237 self._test_ZipWriteStr("bar", random_string, {
243 self._test_ZipWriteStr(zinfo, random_string, {
246 self._test_ZipWriteStr(zinfo, random_string, {
251 def test_ZipWriteStr_large_file(self): argument
257 self._test_ZipWriteStr_large_file(long_string, short_string, {
261 def test_ZipWriteStr_resets_ZIP64_LIMIT(self): argument
262 self._test_reset_ZIP64_LIMIT(self._test_ZipWriteStr, "foo", "")
264 self._test_reset_ZIP64_LIMIT(self._test_ZipWriteStr, zinfo, "")
266 def test_bug21309935(self): argument
288 self._verify(zip_file, zip_file_name, "foo", random_string,
290 self._verify(zip_file, zip_file_name, "bar", random_string,
292 self._verify(zip_file, zip_file_name, "baz", random_string,
294 self._verify(zip_file, zip_file_name, "qux", random_string,