class_docstr: Test MODIS L2 reader.
class_docstr_tok: ["Test","MODIS","L2","reader","."]
docstr: Test loading category products.
docstr_tok: ["Test","loading","category","products","."]
code: def test_load_category_dataset(
      self,
      input_files,
      loadables,
      request_resolution,
      exp_resolution,
      exp_area,
  ):
      """Test loading category products."""
      scene = Scene(reader="modis_l2", filenames=input_files)
      kwargs = (
          {"resolution": request_resolution}
          if request_resolution is not None
          else {}
      )
      scene.load(loadables, **kwargs)
      for ds_name in loadables:
          cat_id = make_dataid(name=ds_name, resolution=exp_resolution)
          assert cat_id in scene
          cat_data_arr = scene[cat_id]
          assert isinstance(cat_data_arr.data, da.Array)
          cat_data_arr = cat_data_arr.compute()
          assert cat_data_arr.shape == _shape_for_resolution(
              exp_resolution
          )
          assert cat_data_arr.values[0, 0] == 0.0
          assert cat_data_arr.attrs.get("resolution") == exp_resolution
          # mask variables should be integers
          assert np.issubdtype(cat_data_arr.dtype, np.integer)
          assert cat_data_arr.attrs.get("_FillValue") is not None
          _check_shared_metadata(cat_data_arr, expect_area=exp_area)
  
file_path: satpy/satpy/tests/reader_tests/modis_tests/test_modis_l2.py
imports: from __future__ import annotations
  import dask
  import dask.array
  import numpy
  import pytest
  from pytest_lazyfixture import lazy_fixture
  from satpy import Scene, available_readers
  from satpy.tests.utils import CustomScheduler, make_dataid
  from ._modis_fixtures import _shape_for_resolution
label_desc: Use image node_id 5 for calling the TestModisL2 obj's underlying member method code with example usage: obj.test_load_category_dataset(input_files, loadables, request_resolution, exp_resolution, exp_area) without return types