class_docstr: Test cases of the MCMIP file format.
class_docstr_tok: ["Test","cases","of","the","MCMIP","file","format","."]
docstr: Test getting channel from MCMIP file.
docstr_tok: ["Test","getting","channel","from","MCMIP","file","."]
code: def test_mcmip_get_dataset(self, xr_, product, exp_metadata):
      """Test getting channel from MCMIP file."""
      from datetime import datetime
  
      from pyresample.geometry import AreaDefinition
  
      from satpy import Scene
  
      fake_ds = _create_mcmip_dataset()
      xr_.open_dataset.return_value = fake_ds
  
      fn = "OR_ABI-L2-MCMIPF-M6_G16_s20192600241149_e20192600243534_c20192600245360.nc"
      scn = Scene(reader="abi_l2_nc", filenames=[fn])
      scn.load([product])
  
      exp_data = np.array(
          [
              [2 * 0.3052037, np.nan],
              [32768 * 0.3052037, 32767 * 0.3052037],
          ]
      )
      if "C01" in product:
          exp_data *= 100
  
      exp_attrs = {
          "instrument_ID": None,
          "modifiers": (),
          "name": product,
          "observation_type": "MCMIP",
          "orbital_slot": None,
          "reader": "abi_l2_nc",
          "platform_name": "GOES-16",
          "platform_shortname": "G16",
          "production_site": None,
          "scan_mode": "M6",
          "scene_abbr": "F",
          "scene_id": None,
          "sensor": "abi",
          "timeline_ID": None,
          "start_time": datetime(2017, 9, 20, 17, 30, 40, 800000),
          "end_time": datetime(2017, 9, 20, 17, 41, 17, 500000),
          "ancillary_variables": [],
      }
      exp_attrs.update(exp_metadata)
  
      res = scn[product]
      np.testing.assert_allclose(res.data, exp_data, equal_nan=True)
      assert isinstance(res.attrs["area"], AreaDefinition)
      _compare_subdict(res.attrs, exp_attrs)
      _assert_orbital_parameters(res.attrs["orbital_parameters"])
  
imports: import contextlib
  from typing import Optional
  from unittest import mock
  import numpy
  import pytest
  import xarray
label_desc: Use image node_id 1 for calling the TestMCMIPReading obj's underlying member method code with example usage: obj.test_mcmip_get_dataset(xr_, product, exp_metadata) without return types