  from django.contrib.gis.gdal.error import GDALException
  from django.contrib.gis.gdal.raster.band import GDALBand
  from django.contrib.gis.shortcuts import numpy
  from django.test import SimpleTestCase
  
  from ..data.rasters.textrasters import JSON_RASTER
  
 
</s> remove import tempfile
 </s> add  </s> remove         rstfile = tempfile.NamedTemporaryFile(suffix=".tif")
 </s> add         rstfile = NamedTemporaryFile(suffix=".tif") </s> remove         with tempfile.NamedTemporaryFile(mode="w", suffix=".json") as tmp:
 </s> add         with NamedTemporaryFile(mode="w", suffix=".json") as tmp: </s> remove         rstfile = tempfile.NamedTemporaryFile(suffix=".tif")
 </s> add         rstfile = NamedTemporaryFile(suffix=".tif")
from django.core.files.temp import NamedTemporaryFile
  from django.contrib.gis.gdal.error import GDALException
  from django.contrib.gis.gdal.raster.band import GDALBand
  from django.contrib.gis.shortcuts import numpy
from django.core.files.temp import NamedTemporaryFile
  from django.test import SimpleTestCase
  
  from ..data.rasters.textrasters import JSON_RASTER
  
keep keep add keep keep keep keep
 Fixed #34374 -- Fixed GIS tests on Windows. 
tests/gis_tests/gdal_tests/test_raster.py