class_docstr: Test composites for spectral channel corrections.
class_docstr_tok: ["Test","composites","for","spectral","channel","corrections","."]
docstr: Test that error is raised if the amount of channels to blend does not match the number of weights.
docstr_tok: ["Test","that","error","is","raised","if","the","amount","of","channels","to","blend","does","not","match","the","number","of","weights","."]
code: def test_bad_lengths(self):
      """Test that error is raised if the amount of channels to blend does not match the number of weights."""
      comp = SpectralBlender(
          "blended_channel",
          fractions=(0.3, 0.7),
          prerequisites=(0.51, 0.85),
          standard_name="toa_bidirectional_reflectance",
      )
      with pytest.raises(
          ValueError,
          match="fractions and projectables must have the same length.",
      ):
          comp((self.c01, self.c02, self.c03))
  
file_path: satpy/satpy/tests/compositor_tests/test_spectral.py
imports: import dask
  import dask.array
  import numpy
  import pytest
  import xarray
  from satpy.composites.spectral import HybridGreen, NDVIHybridGreen, SpectralBlender
  from satpy.tests.utils import CustomScheduler
label_desc: Use image node_id 2 for calling the TestSpectralComposites obj's underlying member method code with example usage: obj.test_bad_lengths() without return types