(self)
| 1950 | zipfp.open(name).close() |
| 1951 | |
| 1952 | def test_write_unicode_filenames(self): |
| 1953 | with zipfile.ZipFile(TESTFN, "w") as zf: |
| 1954 | zf.writestr("foo.txt", "Test for unicode filename") |
| 1955 | zf.writestr("\xf6.txt", "Test for unicode filename") |
| 1956 | self.assertIsInstance(zf.infolist()[0].filename, str) |
| 1957 | |
| 1958 | with zipfile.ZipFile(TESTFN, "r") as zf: |
| 1959 | self.assertEqual(zf.filelist[0].filename, "foo.txt") |
| 1960 | self.assertEqual(zf.filelist[1].filename, "\xf6.txt") |
| 1961 | |
| 1962 | def create_zipfile_with_extra_data(self, filename, extra_data_name): |
| 1963 | with zipfile.ZipFile(TESTFN, mode='w') as zf: |
nothing calls this directly
no test coverage detected