Integrates with zipfile.ZipFile.
(self, _zipf_prop_: Mock)
| 324 | _zipf_prop_.return_value.close.assert_called_once_with() |
| 325 | |
| 326 | def it_can_write_a_blob(self, _zipf_prop_: Mock): |
| 327 | """Integrates with zipfile.ZipFile.""" |
| 328 | pack_uri = PackURI("/part/name.xml") |
| 329 | _zipf_prop_.return_value = zipf = zipfile.ZipFile(io.BytesIO(), "w") |
| 330 | pkg_writer = _ZipPkgWriter("") |
| 331 | |
| 332 | pkg_writer.write(pack_uri, b"blob") |
| 333 | |
| 334 | members = {PackURI("/%s" % name): zipf.read(name) for name in zipf.namelist()} |
| 335 | assert len(members) == 1 |
| 336 | assert members[pack_uri] == b"blob" |
| 337 | |
| 338 | def it_provides_access_to_the_open_zip_file_to_help(self, request: FixtureRequest): |
| 339 | ZipFile_ = class_mock(request, "pptx.opc.serialized.zipfile.ZipFile") |
nothing calls this directly
no test coverage detected