Pillow/Tests/test_image_getim.py
2024-09-02 05:14:03 +04:00

20 lines
435 B
Python

from __future__ import annotations
import pytest
from .helper import hopper
def test_sanity() -> None:
im = hopper()
type_repr = repr(type(im.getim()))
assert "PyCapsule" in type_repr
with pytest.warns(DeprecationWarning):
assert isinstance(im.im.id, int)
with pytest.warns(DeprecationWarning):
ptrs = dict(im.im.unsafe_ptrs)
assert all(k in ptrs for k in ["image8", "image32", "image"])