class_docstr: Test various VIIRS-specific composites.
class_docstr_tok: ["Test","various","VIIRS-specific","composites","."]
docstr: Test the 'adaptive_dnb' compositor.
docstr_tok: ["Test","the","'adaptive_dnb","'","compositor","."]
code: def test_adaptive_dnb(self, dnb, sza):
      """Test the 'adaptive_dnb' compositor."""
      from satpy.composites.viirs import AdaptiveDNB
  
      comp = AdaptiveDNB(
          "adaptive_dnb",
          prerequisites=("dnb",),
          standard_name="toa_outgoing_radiance_per_" "unit_wavelength",
      )
      res = comp((dnb, sza))
      assert isinstance(res, xr.DataArray)
      assert isinstance(res.data, da.Array)
      assert res.attrs["name"] == "adaptive_dnb"
      assert res.attrs["standard_name"] == "equalized_radiance"
      data = res.compute()
      np.testing.assert_allclose(data.data, 0.999, rtol=1e-4)
  
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 7 for calling the TestVIIRSComposites obj's underlying member method code with example usage: obj.test_adaptive_dnb(dnb, sza) without return types