class_docstr: Test the ProjectionVisualizer base class
class_docstr_tok: ["Test","the","ProjectionVisualizer","base","class"]
docstr: Assert error is raised when y is not passed to transform
docstr_tok: ["Assert","error","is","raised","when","y","is","not","passed","to","transform"]
code: def test_y_required_for_discrete_and_continuous(self, dataset):
      """
      Assert error is raised when y is not passed to transform
      """
      X, y = getattr(self, dataset)
      visualizer = MockVisualizer()
      visualizer.fit(X, y)
  
      msg = "y is required for {} target".format(dataset)
      with pytest.raises(YellowbrickValueError, match=msg):
          visualizer.transform(X)
  
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 10 for calling the TestProjectionVisualizer obj's underlying member method code with example usage: obj.test_y_required_for_discrete_and_continuous(dataset) without return types