class_docstr: Test HDF4 File Handler Utility class.
class_docstr_tok: ["Test","HDF4","File","Handler","Utility","class","."]
docstr: Test everything about the HDF4 class.
docstr_tok: ["Test","everything","about","the","HDF4","class","."]
code: def test_all_basic(self):
      """Test everything about the HDF4 class."""
      from satpy.readers.hdf4_utils import HDF4FileHandler
  
      file_handler = HDF4FileHandler("test.hdf", {}, {})
  
      for ds in ("ds1_f", "ds1_i"):
          assert file_handler[ds + "/dtype"] == (
              np.float32 if ds.endswith("f") else np.int16
          )
          assert file_handler[ds + "/shape"] == (10, 100)
          # make sure that the dtype is an instance, not the class
          assert file_handler[ds].dtype.itemsize == (
              4 if ds.endswith("f") else 2
          )
          attrs = file_handler[ds].attrs
          assert attrs.get("test_attr_str") == "test_string"
          assert attrs.get("test_attr_int") == 0
          assert attrs.get("test_attr_float") == 1.2
  
      assert isinstance(file_handler["/attr/test_attr_str"], str)
      assert file_handler["/attr/test_attr_str"] == "test_string"
      # self.assertEqual(file_handler['/attr/test_attr_str_arr'], 'test_string2')
      assert isinstance(file_handler["/attr/test_attr_int"], int)
      assert file_handler["/attr/test_attr_int"] == 0
      assert isinstance(file_handler["/attr/test_attr_float"], float)
      assert file_handler["/attr/test_attr_float"] == 1.2
  
      assert isinstance(file_handler.get("ds1_f"), xr.DataArray)
      assert file_handler.get("fake_ds") is None
      assert file_handler.get("fake_ds", "test") == "test"
  
      assert "ds1_f" in file_handler
      assert "fake_ds" not in file_handler
  
file_path: satpy/satpy/tests/reader_tests/test_hdf4_utils.py
imports: import os
  import unittest
  import numpy
  import xarray
label_desc: Use image node_id 3 for calling the TestHDF4FileHandler obj's underlying member method code with example usage: obj.test_all_basic() without return types