class_docstr: Test various VIIRS-specific composites.
class_docstr_tok: ["Test","various","VIIRS-specific","composites","."]
docstr: Test the 'snow_age' compositor.
docstr_tok: ["Test","the","'snow_age","'","compositor","."]
code: def test_snow_age(self, area):
      """Test the 'snow_age' compositor."""
      from satpy.composites.viirs import SnowAge
  
      projectables = tuple(
          xr.DataArray(
              da.from_array(np.full(area.shape, 5.0 * i), chunks=5),
              dims=("y", "x"),
              attrs={
                  "name": f"M0{i:d}",
                  "calibration": "reflectance",
                  "units": "%",
              },
          )
          for i in range(7, 12)
      )
      comp = SnowAge(
          "snow_age",
          prerequisites=(
              "M07",
              "M08",
              "M09",
              "M10",
              "M11",
          ),
          standard_name="snow_age",
      )
      res = comp(projectables)
      assert isinstance(res, xr.DataArray)
      assert isinstance(res.data, da.Array)
      assert res.attrs["name"] == "snow_age"
      assert "units" not in res.attrs
  
file_path: satpy/satpy/tests/compositor_tests/test_viirs.py
imports: from datetime import datetime
  import dask.array
  import numpy
  import pytest
  import xarray
  from pyresample.geometry import AreaDefinition
label_desc: Use image node_id 11 for calling the TestVIIRSComposites obj's underlying member method code with example usage: obj.test_snow_age(area) without return types