示例#1
0
def test_get_cairo_surface_bad_input():
    with pytest.raises(images.LoadingError):
        images.get_cairo_surface(b'asdfasfdi3')
示例#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
示例#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
示例#4
0
def test_get_cairo_surface_bad_input():
    with pytest.raises(cairocffi.pixbuf.ImageLoadingError):
        images.get_cairo_surface(b"asdfasfdi3")
示例#5
0
def test_get_cairo_surface_bad_input():
    with pytest.raises(images.LoadingError):
        images.get_cairo_surface(b'asdfasfdi3')