class_docstr: Test utilities used with colormaps.
class_docstr_tok: ["Test","utilities","used","with","colormaps","."]
docstr: Test that data created as VRGB still reads as RGBA.
code: def test_cmap_vrgb_as_rgba(self):
      """Test that data created as VRGB still reads as RGBA."""
      with closed_named_temp_file(suffix=".npy") as cmap_filename:
          cmap_data = _generate_cmap_test_data(None, "VRGB")
          np.save(cmap_filename, cmap_data)
          cmap = create_colormap(
              {"filename": cmap_filename, "colormap_mode": "RGBA"}
          )
          assert cmap.colors.shape[0] == 4
          assert cmap.colors.shape[1] == 4  # RGBA
          np.testing.assert_equal(
              cmap.colors[0], [128 / 255.0, 1.0, 0, 0]
          )
          assert cmap.values.shape[0] == 4
          assert cmap.values[0] == 0
          assert cmap.values[-1] == 1.0
  
imports: import contextlib
  import os
  from tempfile import NamedTemporaryFile
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from satpy.enhancements import create_colormap, on_dask_array, on_separate_bands, using_map_blocks
label_desc: Use image node_id 2 for calling the TestColormapLoading obj's underlying member method code with example usage: obj.test_cmap_vrgb_as_rgba() without return types