def test_shapes_connectivity_invalid(diagonal_image):

    with Env():
        with pytest.raises(ValueError):
            assert next(shapes(diagonal_image, connectivity=12))
Invalid connectivity should raise exception
dataset/ETHPy150Open mapbox/rasterio/tests/test_features.py/test_shapes_connectivity_invalid