class_docstr: Test DataVisualizer base class
class_docstr_tok: ["Test","DataVisualizer","base","class"]
docstr: Test discrete colors with label encoding and colors
code: def test_get_colors_discrete_classes(self):
      """
      Test discrete colors with label encoding and colors
      """
      X, y = self.discrete
      oz = DataVisualizer(
          classes=["a", "b", "c", "d", "e"],
          colors=["g", "r", "b", "m", "y"],
      ).fit(X, y)
      assert oz.get_target_color_type() == TargetType.DISCRETE
  
      colors = oz.get_colors(y)
      assert len(colors) == len(y)
      assert set(colors) == set(["g", "r", "b", "m", "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 15 for calling the TestDataVisualizer obj's underlying member method code with example usage: obj.test_get_colors_discrete_classes() without return types