class_docstr: The visual test case class ensures that all tests inside of the class
  can execute image similarity tests inside of a clean matplotlib global
  figure.
docstr: Accessible testing method for testing generation of a Visualizer.
  
  Requires the placement of a baseline image for comparison in the
  tests/baseline_images folder that corresponds to the module path of the
  VisualTestCase being evaluated. The name of the image corresponds to
  the test function where "self.assert_images_similar" is called.
  
  For example, calling "assert_images_similar" in the test function
  "test_class_report" in tests.test_classifier.test_class_balance would
  require placement a baseline image at:
  
  baseline_images/test_classifier/test_class_balance/test_class_report.png
  
  The easiest way to generate a baseline image is to first run the test that
  calls "assert_images_similar", and then copy the actual test generated
  image from:
  
  actual_images/
  
  visualizer : yellowbrick visualizer, default: None
      An instantiated yellowbrick visualizer that has been fitted,
      transformed and had all operations except for show called on it.
  
  ax : matplotlib Axes, default: None
      The axis to plot the figure on.
  
  tol : float, default: 0.01
      The tolerance (a color value difference, where 255 is the
      maximal difference).  The test fails if the average pixel
      difference is greater than this value.
  
  windows_tol: float, default: None
      Similar to the tol parameter, but targeted for testing on a
      windows environment.
  
  kwargs : dict
      Options to pass to the ImageComparison class.
docstr_tok: ["Accessible","testing","method","for","testing","generation","of","a","Visualizer",".","Requires","the","placement","of","a","baseline","image","for","comparison","in","the","tests\/baseline_images","folder","that","corresponds","to","the","module","path","of","the","VisualTestCase","being","evaluated",".","The","name","of","the","image","corresponds","to","the","test","function","where","``","self.assert_images_similar","''","is","called",".","For","example",",","calling","``","assert_images_similar","''","in","the","test","function","''","test_class_report","''","in","tests.test_classifier.test_class_balance","would","require","placement","a","baseline","image","at",":","baseline_images\/test_classifier\/test_class_balance\/test_class_report.png","The","easiest","way","to","generate","a","baseline","image","is","to","first","run","the","test","that","calls","``","assert_images_similar","''",",","and","then","copy","the","actual","test","generated","image","from",":","actual_images\/","visualizer",":","yellowbrick","visualizer",",","default",":","None","An","instantiated","yellowbrick","visualizer","that","has","been","fitted",",","transformed","and","had","all","operations","except","for","show","called","on","it",".","ax",":","matplotlib","Axes",",","default",":","None","The","axis","to","plot","the","figure","on",".","tol",":","float",",","default",":","0.01","The","tolerance","(","a","color","value","difference",",","where","255","is","the","maximal","difference",")",".","The","test","fails","if","the","average","pixel","difference","is","greater","than","this","value",".","windows_tol",":","float",",","default",":","None","Similar","to","the","tol","parameter",",","but","targeted","for","testing","on","a","windows","environment",".","kwargs",":","dict","Options","to","pass","to","the","ImageComparison","class","."]
code: def assert_images_similar(
      self,
      visualizer=None,
      ax=None,
      tol=0.01,
      windows_tol=None,
      **kwargs,
  ):
      """Accessible testing method for testing generation of a Visualizer.
  
      Requires the placement of a baseline image for comparison in the
      tests/baseline_images folder that corresponds to the module path of the
      VisualTestCase being evaluated. The name of the image corresponds to
      the test function where "self.assert_images_similar" is called.
  
      For example, calling "assert_images_similar" in the test function
      "test_class_report" in tests.test_classifier.test_class_balance would
      require placement a baseline image at:
  
      baseline_images/test_classifier/test_class_balance/test_class_report.png
  
      The easiest way to generate a baseline image is to first run the test that
      calls "assert_images_similar", and then copy the actual test generated
      image from:
  
      actual_images/
  
      visualizer : yellowbrick visualizer, default: None
          An instantiated yellowbrick visualizer that has been fitted,
          transformed and had all operations except for show called on it.
  
      ax : matplotlib Axes, default: None
          The axis to plot the figure on.
  
      tol : float, default: 0.01
          The tolerance (a color value difference, where 255 is the
          maximal difference).  The test fails if the average pixel
          difference is greater than this value.
  
      windows_tol: float, default: None
          Similar to the tol parameter, but targeted for testing on a
          windows environment.
  
      kwargs : dict
          Options to pass to the ImageComparison class.
      """
      # Hide this method from the pytest traceback on test failure.
      __tracebackhide__ = True
  
      # Build and execute the image comparison
      compare = ImageComparison(
          inspect.stack(),
          visualizer=visualizer,
          ax=ax,
          tol=tol,
          windows_tol=windows_tol,
          **kwargs,
      )
      compare()
  
      # Return the compare object for meta testing
      return compare
  
imports: import os
  import sys
  import inspect
  import matplotlib
  import matplotlib.pyplot
  from matplotlib import ticker
  from matplotlib.testing.compare import compare_images
  from yellowbrick.exceptions import ImageComparisonFailure
label_desc: Use image node_id 2 for calling the VisualTestCase obj's underlying member method code with example usage: obj.assert_images_similar(visualizer, ax, tol, windows_tol) and returns: compare