class_docstr: Test MODIS L3 reader.
class_docstr_tok: ["Test","MODIS","L3","reader","."]
docstr: Test that datasets are available.
docstr_tok: ["Test","that","datasets","are","available","."]
code: def test_scene_available_datasets(self, loadable, filename):
      """Test that datasets are available."""
      scene = Scene(reader="modis_l3", filenames=filename)
      available_datasets = scene.all_dataset_names()
      assert len(available_datasets) > 0
      assert loadable in available_datasets
  
      from satpy.readers.modis_l3 import ModisL3GriddedHDFFileHandler
  
      fh = ModisL3GriddedHDFFileHandler(
          filename[0], {}, {"file_type": "modis_l3_cmg_hdf"}
      )
      configured_datasets = [
          [None, {"name": "none_ds", "file_type": "modis_l3_cmg_hdf"}],
          [True, {"name": "true_ds", "file_type": "modis_l3_cmg_hdf"}],
          [
              False,
              {"name": "false_ds", "file_type": "modis_l3_cmg_hdf"},
          ],
          [None, {"name": "other_ds", "file_type": "modis_l2_random"}],
      ]
      for status, mda in fh.available_datasets(configured_datasets):
          if mda["name"] == "none_ds":
              assert mda["file_type"] == "modis_l3_cmg_hdf"
              assert status is False
          elif mda["name"] == "true_ds":
              assert mda["file_type"] == "modis_l3_cmg_hdf"
              assert status
          elif mda["name"] == "false_ds":
              assert mda["file_type"] == "modis_l3_cmg_hdf"
              assert status is False
          elif mda["name"] == "other_ds":
              assert mda["file_type"] == "modis_l2_random"
              assert status is None
          elif mda["name"] == loadable:
              assert mda["file_type"] == "modis_l3_cmg_hdf"
              assert status
  
file_path: satpy/satpy/tests/reader_tests/modis_tests/test_modis_l3.py
imports: from __future__ import annotations
  import dask.array
  import numpy
  import pytest
  from pyresample import geometry
  from pytest_lazyfixture import lazy_fixture
  from satpy import Scene, available_readers
label_desc: Use image node_id 2 for calling the TestModisL3 obj's underlying member method code with example usage: obj.test_scene_available_datasets(loadable, filename) without return types