class_docstr: Tests for the AHI HSD file handler.
class_docstr_tok: ["Tests","for","the","AHI","HSD","file","handler","."]
docstr: Test that a bad calibration mode causes an exception.
docstr_tok: ["Test","that","a","bad","calibration","mode","causes","an","exception","."]
code: def test_bad_calibration(self):
      """Test that a bad calibration mode causes an exception."""
      with pytest.raises(
          ValueError,
          match="Invalid calibration mode: BAD_MODE. Choose one of (.*)",
      ):
          with _fake_hsd_handler(fh_kwargs={"calib_mode": "BAD_MODE"}):
              pass
  
imports: from __future__ import annotations
  import contextlib
  import unittest
  import warnings
  from datetime import datetime
  from typing import Any, Dict
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  from satpy.readers.ahi_hsd import AHIHSDFileHandler
  from satpy.readers.utils import get_geostationary_mask
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 1 for calling the TestAHIHSDFileHandler obj's underlying member method code with example usage: obj.test_bad_calibration() without return types