class_docstr: Test the GeoTIFF Writer class.
class_docstr_tok: ["Test","the","GeoTIFF","Writer","class","."]
docstr: Test writing can be delayed.
docstr_tok: ["Test","writing","can","be","delayed","."]
code: def test_simple_delayed_write(self, tmp_path):
      """Test writing can be delayed."""
      from satpy.writers.geotiff import GeoTIFFWriter
  
      datasets = _get_test_datasets_2d()
      w = GeoTIFFWriter(base_dir=tmp_path)
      # when we switch to rio_save on XRImage then this will be sources
      # and targets
      res = w.save_datasets(datasets, compute=False)
      # this will fail if rasterio isn't installed
      assert isinstance(res, tuple)
      # two lists, sources and destinations
      assert len(res) == 2
      assert isinstance(res[0], list)
      assert isinstance(res[1], list)
      assert isinstance(res[0][0], da.Array)
      da.store(res[0], res[1])
      for target in res[1]:
          if hasattr(target, "close"):
              target.close()
  
imports: from datetime import datetime
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
label_desc: Use image node_id 3 for calling the TestGeoTIFFWriter obj's underlying member method code with example usage: obj.test_simple_delayed_write(tmp_path) without return types