Pillow/Tests/test_image_getim.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
435 B
Python
Raw Normal View History

from __future__ import annotations
2024-01-20 14:23:03 +03:00
import pytest
from .helper import hopper
2016-02-05 01:57:13 +03:00
2024-01-25 14:18:46 +03:00
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"])