class_docstr: Test HDF5 File Handler Utility class.
class_docstr_tok: ["Test","HDF5","File","Handler","Utility","class","."]
docstr: Test everything about the HDF5 class.
docstr_tok: ["Test","everything","about","the","HDF5","class","."]
code: def test_all_basic(self):
      """Test everything about the HDF5 class."""
      import xarray as xr
  
      from satpy.readers.hdf5_utils import HDF5FileHandler
  
      file_handler = HDF5FileHandler("test.h5", {}, {})
  
      for ds_name in (
          "test_group/ds1_f",
          "test_group/ds1_i",
          "ds2_f",
          "ds2_i",
      ):
          ds = file_handler[ds_name]
          attrs = ds.attrs
          assert ds.dtype == (
              np.float32 if ds_name.endswith("f") else np.int32
          )
          assert file_handler[ds_name + "/shape"] == (10, 100)
          assert attrs["test_attr_str"] == "test_string"
          assert attrs["test_attr_byte"] == "test_byte"
          assert attrs["test_attr_int"] == 0
          assert attrs["test_attr_float"] == 1.2
          assert (
              file_handler[ds_name + "/attr/test_attr_str"]
              == "test_string"
          )
          assert (
              file_handler[ds_name + "/attr/test_attr_byte"]
              == "test_byte"
          )
          assert file_handler[ds_name + "/attr/test_attr_int"] == 0
          assert file_handler[ds_name + "/attr/test_attr_float"] == 1.2
  
      assert file_handler["/attr/test_attr_str"] == "test_string"
      assert file_handler["/attr/test_attr_byte"] == "test_byte"
      assert file_handler["/attr/test_attr_str_arr"] == "test_string2"
      assert file_handler["/attr/test_attr_int"] == 0
      assert file_handler["/attr/test_attr_float"] == 1.2
  
      assert isinstance(file_handler.get("ds2_f"), xr.DataArray)
      assert file_handler.get("fake_ds") is None
      assert file_handler.get("fake_ds", "test") == "test"
  
      assert "ds2_f" in file_handler
      assert "fake_ds" not in file_handler
  
      assert isinstance(file_handler["ds2_f/attr/test_ref"], np.ndarray)
  
file_path: satpy/satpy/tests/reader_tests/test_hdf5_utils.py
imports: import os
  import unittest
  import numpy
label_desc: Use image node_id 3 for calling the TestHDF5FileHandler obj's underlying member method code with example usage: obj.test_all_basic() without return types