class_docstr: Tests the ColorPalette object
docstr: Test that a palette can be initialized by a list
docstr_tok: ["Test","that","a","palette","can","be","initialized","by","a","list"]
code: def test_init_palette_by_list(self):
      """
      Test that a palette can be initialized by a list
      """
  
      # Try all the values in the palettes (HEX)
      for value in PALETTES.values():
          palette = ColorPalette(value)
          assert len(value) == len(palette)
  
      # Try all the values converted to RGB
      for value in PALETTES.values():
          palette = ColorPalette(
              map(mpl.colors.colorConverter.to_rgb, value)
          )
          assert len(value) == len(palette)
  
imports: import pytest
  import numpy
  import matplotlib
  from yellowbrick.exceptions import *
  from yellowbrick.style.palettes import *
  from yellowbrick.style.colors import get_color_cycle
  from yellowbrick.style.rcmod import set_aesthetic, set_palette
  from yellowbrick.style.palettes import color_sequence, color_palette
  from yellowbrick.style.palettes import ColorPalette, PALETTES, SEQUENCES
  from tests.base import VisualTestCase
label_desc: Use image node_id 2 for calling the TestColorPaletteObject obj's underlying member method code with example usage: obj.test_init_palette_by_list() without return types