(self, from_blob_, image_)
| 92 | """Unit-test suite for `pptx.parts.image.Image` objects.""" |
| 93 | |
| 94 | def it_can_construct_from_a_path(self, from_blob_, image_): |
| 95 | with open(test_image_path, "rb") as f: |
| 96 | blob = f.read() |
| 97 | from_blob_.return_value = image_ |
| 98 | |
| 99 | image = Image.from_file(test_image_path) |
| 100 | |
| 101 | Image.from_blob.assert_called_once_with(blob, "python-icon.jpeg") |
| 102 | assert image is image_ |
| 103 | |
| 104 | def it_can_construct_from_a_stream(self, from_stream_fixture): |
| 105 | image_file, blob, image_ = from_stream_fixture |