class_docstr: Unit tests for FIDUCEO MVIRI file handlers.
class_docstr_tok: ["Unit","tests","for","FIDUCEO","MVIRI","file","handlers","."]
docstr: Test getting datasets.
docstr_tok: ["Test","getting","datasets","."]
code: def test_get_dataset(
      self, file_handler, name, calibration, resolution, expected
  ):
      """Test getting datasets."""
      id_keys = {"name": name, "resolution": resolution}
      if calibration:
          id_keys["calibration"] = calibration
      dataset_id = make_dataid(**id_keys)
      dataset_info = {"platform": "MET7"}
  
      is_easy = isinstance(
          file_handler, FiduceoMviriEasyFcdrFileHandler
      )
      is_vis = name == "VIS"
      is_refl = calibration == "reflectance"
      if is_easy and is_vis and not is_refl:
          # VIS counts/radiance not available in easy FCDR
          with pytest.raises(
              ValueError,
              match="Cannot calibrate to .*. Easy FCDR provides reflectance only.",
          ):
              file_handler.get_dataset(dataset_id, dataset_info)
      else:
          ds = file_handler.get_dataset(dataset_id, dataset_info)
          xr.testing.assert_allclose(ds, expected)
          assert ds.dtype == expected.dtype
          assert ds.attrs == expected.attrs
  
imports: from __future__ import annotations
  import os
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyproj import CRS
  from pyresample.geometry import AreaDefinition
  from satpy.readers.mviri_l1b_fiduceo_nc import ALTITUDE, EQUATOR_RADIUS, POLE_RADIUS, DatasetWrapper, FiduceoMviriEasyFcdrFileHandler, FiduceoMviriFullFcdrFileHandler
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 2 for calling the TestFiduceoMviriFileHandlers obj's underlying member method code with example usage: obj.test_get_dataset(file_handler, name, calibration, resolution, expected) without return types