class_docstr: Test ClassBalance visualizer
class_docstr_tok: ["Test","ClassBalance","visualizer"]
docstr: Assert error raised when more classes are in data than specified
docstr_tok: ["Assert","error","raised","when","more","classes","are","in","data","than","specified"]
code: def test_class_names_must_match(self):
      """
      Assert error raised when more classes are in data than specified
      """
      oz = ClassBalance(labels=["a", "b", "c"])
      dataset = make_fixture(binary=False, split=False)
  
      with pytest.raises(YellowbrickValueError):
          oz.fit(dataset.y)
  
imports: import pytest
  from yellowbrick.target.class_balance import *
  from yellowbrick.datasets import load_occupancy
  from yellowbrick.exceptions import YellowbrickValueError
  from tests.fixtures import Dataset, Split
  from tests.base import VisualTestCase
  from sklearn.datasets import make_classification
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 3 for calling the TestClassBalance obj's underlying member method code with example usage: obj.test_class_names_must_match() without return types