Ejemplo n.º 1
0
def test_get_cairo_surface_bad_input():
    with pytest.raises(images.LoadingError):
        images.get_cairo_surface(b'asdfasfdi3')
Ejemplo n.º 2
0
def test_get_cairo_surface(path_n_bytes_image):
    path, bytes_image = path_n_bytes_image
    surf_info = images.get_cairo_surface(bytes_image)
    assert isinstance(surf_info.surface, cairocffi.ImageSurface)
    assert path.split('.')[-1].lower() == surf_info.file_type
Ejemplo n.º 3
0
def test_get_cairo_surface(path_n_bytes_image):
    path, bytes_image = path_n_bytes_image
    surf_info = images.get_cairo_surface(bytes_image)
    assert isinstance(surf_info.surface, cairocffi.ImageSurface)
    assert path.split(".")[-1].lower() == surf_info.file_type
Ejemplo n.º 4
0
def test_get_cairo_surface_bad_input():
    with pytest.raises(cairocffi.pixbuf.ImageLoadingError):
        images.get_cairo_surface(b"asdfasfdi3")
Ejemplo n.º 5
0
def test_get_cairo_surface_bad_input():
    with pytest.raises(images.LoadingError):
        images.get_cairo_surface(b'asdfasfdi3')