(cls)
| 1809 | |
| 1810 | @classmethod |
| 1811 | def setUpClass(cls): |
| 1812 | p = cls.ar_with_file = TESTFN + '-with-file.zip' |
| 1813 | cls.addClassCleanup(unlink, p) |
| 1814 | with zipfile.ZipFile(p, 'w') as zipfp: |
| 1815 | zipfp.writestr('test', b'newcontent') |
| 1816 | |
| 1817 | p = cls.ar_with_dir = TESTFN + '-with-dir.zip' |
| 1818 | cls.addClassCleanup(unlink, p) |
| 1819 | with zipfile.ZipFile(p, 'w') as zipfp: |
| 1820 | zipfp.mkdir('test') |
| 1821 | |
| 1822 | p = cls.ar_with_implicit_dir = TESTFN + '-with-implicit-dir.zip' |
| 1823 | cls.addClassCleanup(unlink, p) |
| 1824 | with zipfile.ZipFile(p, 'w') as zipfp: |
| 1825 | zipfp.writestr('test/file', b'newcontent') |
| 1826 | |
| 1827 | def open(self, path): |
| 1828 | return zipfile.ZipFile(path, 'r') |
no test coverage detected