class_docstr: Test the on-the-fly decompression.
class_docstr_tok: ["Test","the","on-the-fly","decompression","."]
docstr: Test decompression works.
docstr_tok: ["Test","decompression","works","."]
code: def test_decompress(self, popen):
      """Test decompression works."""
      popen.return_value.returncode = 0
      popen.return_value.communicate.return_value = [
          b"Decompressed file: bla.__\n"
      ]
  
      old_env = os.environ.get("XRIT_DECOMPRESS_PATH", None)
  
      with NamedTemporaryFile() as fd:
          os.environ["XRIT_DECOMPRESS_PATH"] = fd.name
          res = decompress("bla.C_")
  
      if old_env is not None:
          os.environ["XRIT_DECOMPRESS_PATH"] = old_env
      else:
          os.environ.pop("XRIT_DECOMPRESS_PATH")
  
      assert res == os.path.join(".", "bla.__")
  
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 3 for calling the TestHRITDecompress obj's underlying member method code with example usage: obj.test_decompress(popen) without return types