class_docstr: Test DataVisualizer base class
class_docstr_tok: ["Test","DataVisualizer","base","class"]
docstr: Test the ways that users can specify colors
code: def test_user_get_colors_discrete(self, colors, colormap):
      """
      Test the ways that users can specify colors
      """
      X, y = self.discrete
      oz = DataVisualizer(
          colors=colors, colormap=colormap, target_type="discrete"
      ).fit(X, y)
  
      colors = oz.get_colors(y)
      assert len(colors) == len(y)
  
imports: import pytest
  import numpy
  import numpy.testing
  from tests.fixtures import Dataset
  from yellowbrick.base import Visualizer
  from yellowbrick.features.base import *
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.datasets import make_classification, make_regression
  from unittest.mock import Mock
label_desc: Use image node_id 17 for calling the TestDataVisualizer obj's underlying member method code with example usage: obj.test_user_get_colors_discrete(colors, colormap) without return types