

def test_read_mode_error(self):
    rs = GDALRaster(self.rs_path, write=False)
    band = rs.bands[0]
    with self.assertRaises(GDALException):
        setattr(band, 'nodata_value', 10)

dataset/ETHPy150Open django/django/tests/gis_tests/gdal_tests/test_raster.py GDALBandTests.test_read_mode_error/original