class_docstr: Test FeatureImportances visualizer
docstr: Fitting a model without feature importances raises an exception
docstr_tok: ["Fitting","a","model","without","feature","importances","raises","an","exception"]
code: def test_fit_no_importances_model(self):
      """
      Fitting a model without feature importances raises an exception
      """
      X = np.random.rand(100, 42)
      y = np.random.rand(100)
  
      visualizer = FeatureImportances(MockEstimator())
      expected_error = (
          "could not find feature importances param on MockEstimator"
      )
  
      with pytest.raises(YellowbrickTypeError, match=expected_error):
          visualizer.fit(X, y)
  
imports: import pytest
  import numpy
  import numpy.testing
  import matplotlib.pyplot
  from yellowbrick.exceptions import NotFitted
  from yellowbrick.model_selection.importances import *
  from yellowbrick.datasets import load_occupancy, load_concrete
  from sklearn.datasets import load_iris
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.ensemble import GradientBoostingClassifier
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.linear_model import LogisticRegression, Lasso
  from sklearn.impute import SimpleImputer
  from sklearn.pipeline import Pipeline
  from unittest import mock
  from tests.base import VisualTestCase
label_desc: Use image node_id 4 for calling the TestFeatureImportancesVisualizer obj's underlying member method code with example usage: obj.test_fit_no_importances_model() without return types