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

Method fixture

tests/image/test_tiff.py:318–339  ·  view source on GitHub ↗
(
        self,
        request,
        ifd_entry_,
        _IfdEntry_,
        _AsciiIfdEntry_,
        _ShortIfdEntry_,
        _LongIfdEntry_,
        _RationalIfdEntry_,
    )

Source from the content-addressed store, hash-verified

316 ]
317 )
318 def fixture(
319 self,
320 request,
321 ifd_entry_,
322 _IfdEntry_,
323 _AsciiIfdEntry_,
324 _ShortIfdEntry_,
325 _LongIfdEntry_,
326 _RationalIfdEntry_,
327 ):
328 bytes_, entry_type = request.param
329 entry_cls_ = {
330 "BYTE": _IfdEntry_,
331 "ASCII": _AsciiIfdEntry_,
332 "SHORT": _ShortIfdEntry_,
333 "LONG": _LongIfdEntry_,
334 "RATIONAL": _RationalIfdEntry_,
335 "CUSTOM": _IfdEntry_,
336 }[entry_type]
337 stream_rdr = StreamReader(io.BytesIO(bytes_), BIG_ENDIAN)
338 offset = 0
339 return stream_rdr, offset, entry_cls_, ifd_entry_
340
341 @pytest.fixture
342 def ifd_entry_(self, request):

Callers

nothing calls this directly

Calls 1

StreamReaderClass · 0.90

Tested by

no test coverage detected