def test_sieve_unsupported_dtypes(basic_image):

    unsupported_types = (
        ('int8', -127),
        ('uint32', 4294967295),
        ('int64', 20439845334323),
        ('float16', -9343.232),
        ('float32', 1.434532),
        ('float64', -98332.133422114)
    )

    with Env():
        for dtype, test_value in unsupported_types:
            with pytest.raises(ValueError):
                sieve(
                    (basic_image).astype(dtype) * test_value,
                    basic_image.sum()
                )
Unsupported data types should raise exceptions
dataset/ETHPy150Open mapbox/rasterio/tests/test_features.py/test_sieve_unsupported_dtypes