class_docstr: Test the angle generation utility functions.
class_docstr_tok: ["Test","the","angle","generation","utility","functions","."]
docstr: Test that trying to cache with non-dask arrays fails.
docstr_tok: ["Test","that","trying","to","cache","with","non-dask","arrays","fails","."]
code: def test_caching_with_array_in_args_warns(self, tmp_path):
      """Test that trying to cache with non-dask arrays fails."""
      from satpy.modifiers.angles import cache_to_zarr_if
  
      @cache_to_zarr_if("cache_lonlats")
      def _fake_func(array):
          return array + 1
  
      with pytest.warns(UserWarning), satpy.config.set(
          cache_lonlats=True, cache_dir=str(tmp_path)
      ):
          _fake_func(da.zeros(100))
  
imports: import contextlib
  import warnings
  from copy import deepcopy
  from datetime import datetime, timedelta
  from glob import glob
  from typing import Optional, Union
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyresample.geometry import AreaDefinition, StackedAreaDefinition
  import satpy
  from satpy.utils import PerformanceWarning
label_desc: Use image node_id 8 for calling the TestAngleGeneration obj's underlying member method code with example usage: obj.test_caching_with_array_in_args_warns(tmp_path) and returns: unknown