(cls)
| 1826 | |
| 1827 | @classmethod |
| 1828 | def setUpClass(cls): |
| 1829 | p = cls.ar_with_file = TESTFN + '-with-file.zip' |
| 1830 | cls.addClassCleanup(unlink, p) |
| 1831 | with zipfile.ZipFile(p, 'w') as zipfp: |
| 1832 | zipfp.writestr('test', b'newcontent') |
| 1833 | |
| 1834 | p = cls.ar_with_dir = TESTFN + '-with-dir.zip' |
| 1835 | cls.addClassCleanup(unlink, p) |
| 1836 | with zipfile.ZipFile(p, 'w') as zipfp: |
| 1837 | zipfp.mkdir('test') |
| 1838 | |
| 1839 | p = cls.ar_with_implicit_dir = TESTFN + '-with-implicit-dir.zip' |
| 1840 | cls.addClassCleanup(unlink, p) |
| 1841 | with zipfile.ZipFile(p, 'w') as zipfp: |
| 1842 | zipfp.writestr('test/file', b'newcontent') |
| 1843 | |
| 1844 | def open(self, path): |
| 1845 | return zipfile.ZipFile(path, 'r') |
nothing calls this directly
no test coverage detected