class_docstr: Test cases for CF spatial dimension and coordinates.
class_docstr_tok: ["Test","cases","for","CF","spatial","dimension","and","coordinates","."]
docstr: Tests for private _is_projected function.
docstr_tok: ["Tests","for","private","_is_projected","function","."]
code: def test_is_projected(self, caplog):
      """Tests for private _is_projected function."""
      from satpy.cf.coords import _is_projected
  
      # test case with units but no area
      da = xr.DataArray(
          np.arange(25).reshape(5, 5),
          dims=("y", "x"),
          coords={
              "x": xr.DataArray(
                  np.arange(5), dims=("x",), attrs={"units": "m"}
              ),
              "y": xr.DataArray(
                  np.arange(5), dims=("y",), attrs={"units": "m"}
              ),
          },
      )
      assert _is_projected(da)
  
      da = xr.DataArray(
          np.arange(25).reshape(5, 5),
          dims=("y", "x"),
          coords={
              "x": xr.DataArray(
                  np.arange(5),
                  dims=("x",),
                  attrs={"units": "degrees_east"},
              ),
              "y": xr.DataArray(
                  np.arange(5),
                  dims=("y",),
                  attrs={"units": "degrees_north"},
              ),
          },
      )
      assert not _is_projected(da)
  
      da = xr.DataArray(np.arange(25).reshape(5, 5), dims=("y", "x"))
      with caplog.at_level(logging.WARNING):
          assert _is_projected(da)
      assert "Failed to tell if data are projected." in caplog.text
  
file_path: satpy/satpy/tests/cf_tests/test_coords.py
imports: import logging
  import numpy
  import pytest
  import xarray
  from pyresample import AreaDefinition
label_desc: Use image node_id 4 for calling the TestCFcoords obj's underlying member method code with example usage: obj.test_is_projected(caplog) without return types