class_docstr: Test the MITIFF Writer class.
docstr: Test saving if mitiff as dataset with only one channel with invalid calibration.
docstr_tok: ["Test","saving","if","mitiff","as","dataset","with","only","one","channel","with","invalid","calibration","."]
code: def test_save_dataset_with_calibration_error_one_dataset(self):
      """Test saving if mitiff as dataset with only one channel with invalid calibration."""
      import sys
  
      from satpy.tests.utils import make_dsq
      from satpy.writers.mitiff import MITIFFWriter
  
      logger.level = logging.DEBUG
  
      dataset = self._get_test_dataset_calibration_one_dataset()
      prereqs = [
          make_dsq(name="4", calibration="not_valid_calibration_name")
      ]
      dataset.attrs["prerequisites"] = prereqs
      w = MITIFFWriter(
          filename=dataset.attrs["metadata_requirements"][
              "file_pattern"
          ],
          base_dir=self.base_dir,
      )
      _reverse_offset = 0.0
      _reverse_scale = 1.0
      _decimals = 2
      stream_handler = logging.StreamHandler(sys.stdout)
      logger.addHandler(stream_handler)
      try:
          with self.assertLogs(logger) as lc:
              w._add_calibration_datasets(
                  4, dataset, _reverse_offset, _reverse_scale, _decimals
              )
              for _op in lc.output:
                  assert (
                      "Unknown calib type. Must be Radiance, Reflectance or BT."
                      in _op
                  )
      finally:
          logger.removeHandler(stream_handler)
  
imports: import logging
  import os
  import unittest
  import numpy
  from PIL import Image
label_desc: Use image node_id 29 for calling the TestMITIFFWriter obj's underlying member method code with example usage: obj.test_save_dataset_with_calibration_error_one_dataset() without return types