class_docstr: Test basic functionality of the central config object.
docstr: Test adding a custom configuration file using SATPY_CONFIG.
docstr_tok: ["Test","adding","a","custom","configuration","file","using","SATPY_CONFIG","."]
code: def test_custom_config_file(self):
      """Test adding a custom configuration file using SATPY_CONFIG."""
      import tempfile
      from importlib import reload
  
      import yaml
  
      import satpy
  
      my_config_dict = {
          "cache_dir": "/path/to/cache",
      }
      try:
          with tempfile.NamedTemporaryFile(
              mode="w+t", suffix=".yaml", delete=False
          ) as tfile:
              yaml.dump(my_config_dict, tfile)
              tfile.close()
              with mock.patch.dict(
                  "os.environ", {"SATPY_CONFIG": tfile.name}
              ):
                  reload(satpy._config)
                  reload(satpy)
                  assert (
                      satpy.config.get("cache_dir") == "/path/to/cache"
                  )
      finally:
          os.remove(tfile.name)
  
imports: from __future__ import annotations
  import contextlib
  import os
  import sys
  import unittest
  from importlib.metadata import EntryPoint
  from pathlib import Path
  from typing import Callable, Iterator
  from unittest import mock
  import pytest
  import satpy
  from satpy import DatasetDict
  from satpy._config import cached_entry_point
  from satpy.composites.config_loader import load_compositor_configs_for_sensors
label_desc: Use image node_id 1 for calling the TestConfigObject obj's underlying member method code with example usage: obj.test_custom_config_file() without return types