code: def test_io_error_env(tmpdir):
      with pytest.raises(RasterioIOError):
          rasterio.open(str(tmpdir.join("foo.tif")))
  
file_path: rasterio/tests/test_err.py
imports: import logging
  import pytest
  import rasterio
  from rasterio._err import CPLE_BaseError
  from rasterio.errors import RasterioIOError
  from rasterio.env import GDALVersion
  from .conftest import gdal_version
label_desc: Use image node_id 2 for calling a global function with example usage: test_io_error_env(tmpdir) without return types