class_docstr: Test the HRITJMAFileHandler.
class_docstr_tok: ["Test","the","HRITJMAFileHandler","."]
docstr: Test creating the file handler.
docstr_tok: ["Test","creating","the","file","handler","."]
code: def test_init(self):
      """Test creating the file handler."""
      from satpy.readers.hrit_jma import HIMAWARI8, UNKNOWN_AREA
  
      # Test addition of extra metadata
      mda = self._get_mda()
      mda_expected = mda.copy()
      mda_expected.update(
          {
              "planned_end_segment_number": 1,
              "planned_start_segment_number": 1,
              "segment_sequence_number": 0,
              "unit": "ALBEDO(%)",
          }
      )
      mda_expected["projection_parameters"]["SSP_longitude"] = 140.7
      reader = self._get_reader(mda=mda)
      assert reader.mda == mda_expected
  
      # Check projection name
      assert reader.projection_name == "GEOS(140.70)"
  
      # Check calibration table
      cal_expected = np.array([[0, -0.1], [1023, 100], [65535, 100]])
      assert np.all(reader.calibration_table == cal_expected)
  
      # Check if scanline timestamps are there (dedicated test below)
      assert isinstance(reader.acq_time, np.ndarray)
      assert reader.acq_time.dtype == np.dtype("datetime64[ns]")
  
      # Check platform
      assert reader.platform == HIMAWARI8
  
      # Check is_segmented attribute
      expected = {0: False, 1: True, 8: True}
      for segno, is_segmented in expected.items():
          mda = self._get_mda(segno=segno)
          reader = self._get_reader(mda=mda)
          assert reader.is_segmented == is_segmented
  
      # Check area IDs
      expected = [
          ({"area": 1}, 1),
          ({"area": 1234}, UNKNOWN_AREA),
          ({}, UNKNOWN_AREA),
      ]
      mda = self._get_mda()
      for filename_info, area_id in expected:
          reader = self._get_reader(
              mda=mda, filename_info=filename_info
          )
          assert reader.area_id == area_id
  
imports: import unittest
  from unittest import mock
  import dask.array
  import numpy
  from xarray import DataArray
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 4 for calling the TestHRITJMAFileHandler obj's underlying member method code with example usage: obj.test_init() without return types