MCPcopy Index your code
hub / github.com/python-openxml/python-docx / filename_fixture

Method filename_fixture

tests/parts/test_image.py:74–83  ·  view source on GitHub ↗
(self, request, image_)

Source from the content-addressed store, hash-verified

72
73 @pytest.fixture(params=["loaded", "new"])
74 def filename_fixture(self, request, image_):
75 partname = PackURI("/word/media/image666.png")
76 if request.param == "loaded":
77 image_part = ImagePart(partname, None, None, None)
78 expected_filename = "image.png"
79 elif request.param == "new":
80 image_.filename = "foobar.PXG"
81 image_part = ImagePart(partname, None, None, image_)
82 expected_filename = image_.filename
83 return image_part, expected_filename
84
85 @pytest.fixture
86 def image_(self, request):

Callers

nothing calls this directly

Calls 2

PackURIClass · 0.90
ImagePartClass · 0.90

Tested by

no test coverage detected