MCPcopy Create free account
hub / github.com/scanny/python-pptx / it_can_construct_from_a_path

Method it_can_construct_from_a_path

tests/test_media.py:20–28  ·  view source on GitHub ↗
(self, video_, from_blob_)

Source from the content-addressed store, hash-verified

18 """Unit-test suite for `pptx.media.Video` objects."""
19
20 def it_can_construct_from_a_path(self, video_, from_blob_):
21 with open(TEST_VIDEO_PATH, "rb") as f:
22 blob = f.read()
23 from_blob_.return_value = video_
24
25 video = Video.from_path_or_file_like(TEST_VIDEO_PATH, "video/mp4")
26
27 Video.from_blob.assert_called_once_with(blob, "video/mp4", "dummy.mp4")
28 assert video is video_
29
30 def it_can_construct_from_a_stream(self, from_stream_fixture):
31 movie_stream, mime_type, blob, video_ = from_stream_fixture

Callers

nothing calls this directly

Calls 2

readMethod · 0.80

Tested by

no test coverage detected