class_docstr: Test resolve_colors helper function
class_docstr_tok: ["Test","resolve_colors","helper","function"]
docstr: Check resolve colors works when a colormap string is passed
docstr_tok: ["Check","resolve","colors","works","when","a","colormap","string","is","passed"]
code: def test_colormap_string(self):
      """
      Check resolve colors works when a colormap string is passed
      """
      cases = (
          (
              {"n_colors": 6, "colormap": "RdBu"},
              [
                  (0.403921568627451, 0.0, 0.12156862745098039, 1.0),
                  (
                      0.8392156862745098,
                      0.3764705882352941,
                      0.30196078431372547,
                      1.0,
                  ),
                  (
                      0.9921568627450981,
                      0.8588235294117647,
                      0.7803921568627451,
                      1.0,
                  ),
                  (
                      0.8196078431372551,
                      0.8980392156862746,
                      0.9411764705882353,
                      1.0,
                  ),
                  (
                      0.2627450980392157,
                      0.5764705882352941,
                      0.7647058823529411,
                      1.0,
                  ),
                  (
                      0.0196078431372549,
                      0.18823529411764706,
                      0.3803921568627451,
                      1.0,
                  ),
              ],
          ),
          (
              {"n_colors": 18, "colormap": "viridis"},
              [
                  (0.267004, 0.004874, 0.329415, 1.0),
                  (0.281924, 0.089666, 0.412415, 1.0),
                  (0.280255, 0.165693, 0.476498, 1.0),
                  (0.263663, 0.237631, 0.518762, 1.0),
                  (0.237441, 0.305202, 0.541921, 1.0),
                  (0.208623, 0.367752, 0.552675, 1.0),
                  (0.182256, 0.426184, 0.55712, 1.0),
                  (0.159194, 0.482237, 0.558073, 1.0),
                  (0.13777, 0.537492, 0.554906, 1.0),
                  (0.121148, 0.592739, 0.544641, 1.0),
                  (0.128087, 0.647749, 0.523491, 1.0),
                  (0.180653, 0.701402, 0.488189, 1.0),
                  (0.274149, 0.751988, 0.436601, 1.0),
                  (0.395174, 0.797475, 0.367757, 1.0),
                  (0.535621, 0.835785, 0.281908, 1.0),
                  (0.688944, 0.865448, 0.182725, 1.0),
                  (0.845561, 0.887322, 0.099702, 1.0),
                  (0.993248, 0.906157, 0.143936, 1.0),
              ],
          ),
          (
              {"n_colors": 9, "colormap": "Set1"},
              [
                  (
                      0.8941176470588236,
                      0.10196078431372549,
                      0.10980392156862745,
                      1.0,
                  ),
                  (
                      0.21568627450980393,
                      0.49411764705882355,
                      0.7215686274509804,
                      1.0,
                  ),
                  (
                      0.30196078431372547,
                      0.6862745098039216,
                      0.2901960784313726,
                      1.0,
                  ),
                  (
                      0.596078431372549,
                      0.3058823529411765,
                      0.6392156862745098,
                      1.0,
                  ),
                  (1.0, 0.4980392156862745, 0.0, 1.0),
                  (1.0, 1.0, 0.2, 1.0),
                  (
                      0.6509803921568628,
                      0.33725490196078434,
                      0.1568627450980392,
                      1.0,
                  ),
                  (
                      0.9686274509803922,
                      0.5058823529411764,
                      0.7490196078431373,
                      1.0,
                  ),
                  (0.6, 0.6, 0.6, 1.0),
              ],
          ),
      )
  
      for kwds, expected in cases:
          colors = resolve_colors(**kwds)
          assert isinstance(colors, list)
          assert colors == expected
  
imports: import sys
  import pytest
  from matplotlib import cm
  from cycler import Cycler
  from sklearn.cluster import KMeans
  from sklearn.datasets import make_blobs
  from yellowbrick.style.colors import *
  from yellowbrick.style.palettes import ColorPalette, PALETTES
  from yellowbrick.cluster.silhouette import SilhouetteVisualizer
  from tests.base import VisualTestCase
label_desc: Use image node_id 6 for calling the TestResolveColors obj's underlying member method code with example usage: obj.test_colormap_string() without return types