class_docstr: Test OSI-SAF level 3 netCDF reader ice files.
class_docstr_tok: ["Test","OSI-SAF","level","3","netCDF","reader","ice","files","."]
docstr: Test retrieval of datasets.
docstr_tok: ["Test","retrieval","of","datasets","."]
code: def test_get_dataset(self, tmp_path):
      """Test retrieval of datasets."""
      tmp_filepath = tmp_path / "fake_dataset.nc"
      self.fake_dataset.to_netcdf(os.fspath(tmp_filepath))
  
      test = OSISAFL3NCFileHandler(
          os.fspath(tmp_filepath),
          self.filename_info,
          self.filetype_info,
      )
  
      res = test.get_dataset(
          DataQuery(name=self.varname), {"standard_name": self.stdname}
      )
      # Check we remove singleton dimension
      assert res.shape[0] == 2
      assert res.shape[1] == 5
  
      # Test values are correct
      test_ds = self.fake_dataset[self.varname].values.squeeze()
      test_ds = np.where(test_ds == self.fillv, np.nan, test_ds)
      test_ds = np.where(test_ds > self.maxv, np.nan, test_ds)
      test_ds = test_ds / self.scl + self.add
      np.testing.assert_allclose(res.values, test_ds)
  
      with pytest.raises(KeyError):
          test.get_dataset(
              DataQuery(name="erroneous dataset"),
              {"standard_name": "erroneous dataset"},
          )
  
imports: import os
  from datetime import datetime
  import numpy
  import pytest
  import xarray
  from pyproj import CRS
  from satpy import DataQuery
  from satpy.readers.osisaf_l3_nc import OSISAFL3NCFileHandler
label_desc: Use image node_id 3 for calling the OSISAFL3ReaderTests obj's underlying member method code with example usage: obj.test_get_dataset(tmp_path) without return types