class_docstr: Test the HRITFileHandler with compressed segments.
class_docstr_tok: ["Test","the","HRITFileHandler","with","compressed","segments","."]
docstr: Test reading a single band from a filepath.
docstr_tok: ["Test","reading","a","single","band","from","a","filepath","."]
code: def test_read_band_filepath(self, stub_compressed_hrit_file):
      """Test reading a single band from a filepath."""
      filename = stub_compressed_hrit_file
  
      with mock.patch(
          "satpy.readers.hrit_base.decompress",
          side_effect=fake_decompress,
      ) as mock_decompress:
          with mock.patch.object(
              HRITFileHandler,
              "_get_hd",
              side_effect=new_get_hd,
              autospec=True,
          ) as get_hd:
              self.reader = HRITFileHandler(
                  filename,
                  {
                      "platform_shortname": "MSG3",
                      "start_time": datetime(2016, 3, 3, 0, 0),
                  },
                  {"filetype": "info"},
                  [
                      mock.MagicMock(),
                      mock.MagicMock(),
                      mock.MagicMock(),
                  ],
              )
  
              res = self.reader.read_band("VIS006", None)
              assert get_hd.call_count == 1
              assert mock_decompress.call_count == 0
              assert res.compute().shape == (464, 3712)
              assert mock_decompress.call_count == 1
  
imports: import bz2
  import gzip
  import os
  import unittest
  from datetime import datetime, timedelta
  from tempfile import NamedTemporaryFile, gettempdir
  from unittest import mock
  import numpy
  import pytest
  from satpy.readers import FSFile
  from satpy.readers.hrit_base import HRITFileHandler, decompress, get_xritdecompress_cmd, get_xritdecompress_outfile
label_desc: Use image node_id 1 for calling the TestHRITFileHandlerCompressed obj's underlying member method code with example usage: obj.test_read_band_filepath(stub_compressed_hrit_file) without return types