Construct a Path with width files at every level of depth.
(self, depth=1, width=1)
| 28 | assert best <= big_o.complexities.Linear |
| 29 | |
| 30 | def make_zip_path(self, depth=1, width=1) -> zipfile.Path: |
| 31 | """ |
| 32 | Construct a Path with width files at every level of depth. |
| 33 | """ |
| 34 | zf = zipfile.ZipFile(io.BytesIO(), mode='w') |
| 35 | pairs = itertools.product(self.make_deep_paths(depth), self.make_names(width)) |
| 36 | for path, name in pairs: |
| 37 | zf.writestr(f"{path}{name}.txt", b'') |
| 38 | zf.filename = "big un.zip" |
| 39 | return zipfile.Path(zf) |
| 40 | |
| 41 | @classmethod |
| 42 | def make_names(cls, width, letters=string.ascii_lowercase): |
no test coverage detected