code: def test_resampling_alg_error():
      """Get an exception instead of a crash when using warp-only algs for read or write, see issue #1930"""
      with pytest.raises(ResamplingAlgorithmError):
          with rasterio.open("tests/data/RGB.byte.tif") as src:
              src.read(
                  1, out_shape=(1, 10, 10), resampling=Resampling.max
              )
  
file_path: rasterio/tests/test_read_resample.py
imports: import numpy
  import pytest
  import rasterio
  from rasterio.enums import Resampling
  from rasterio.errors import ResamplingAlgorithmError
  from rasterio.windows import Window
  from .conftest import requires_gdal33
label_desc: Use image node_id 7 for calling a global function with example usage: test_resampling_alg_error() without return types