Debian Codegraph @

tests/test_surface_pygame.py

raw symbols SCIP
1 import cairo
2 import pytest
3
4 pygame = pytest.importorskip("pygame")
5
6
7 def test_image_surface_to_pygame_image():
8 width, height = 100, 100
9 surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
10 buf = surface.get_data()
11 image = pygame.image.frombuffer(buf, (width, height), "ARGB")
12 assert image