class_docstr: Test the ProjectionVisualizer base class
class_docstr_tok: ["Test","the","ProjectionVisualizer","base","class"]
docstr: Assert label encoding mismatch with y raises exception
docstr_tok: ["Assert","label","encoding","mismatch","with","y","raises","exception"]
code: def test_target_not_label_encoded(self):
      """
      Assert label encoding mismatch with y raises exception
      """
      X, y = self.discrete
      # Multiply every element by 10 to make non-label encoded
      y = y * 10
      visualizer = MockVisualizer()
      msg = "Target needs to be label encoded."
      with pytest.raises(YellowbrickValueError, match=msg):
          visualizer.fit_transform(X, y)
  
imports: import pytest
  import numpy.testing
  import matplotlib.pyplot
  from yellowbrick.features.projection import *
  from yellowbrick.exceptions import YellowbrickValueError
  from tests.base import VisualTestCase
  from unittest import mock
  from sklearn.decomposition import PCA
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
label_desc: Use image node_id 9 for calling the TestProjectionVisualizer obj's underlying member method code with example usage: obj.test_target_not_label_encoded() without return types