class_docstr: A model for a single image comparison test.
code: def __init__(self, path, root, source):
      self.source = source
      self.root = root
      self.dir = path.parent
      self.diff = path.name
      self.reldir = self.dir.relative_to(self.root)
  
      basename = self.diff[: -len("-failed-diff.png")]
      for ext in exts:
          if basename.endswith(f"_{ext}"):
              display_extension = f"_{ext}"
              extension = ext
              basename = basename[: -len(display_extension)]
              break
      else:
          display_extension = ""
          extension = "png"
  
      self.basename = basename
      self.extension = extension
      self.generated = f"{basename}.{extension}"
      self.expected = f"{basename}-expected.{extension}"
      self.expected_display = (
          f"{basename}-expected{display_extension}.png"
      )
      self.generated_display = f"{basename}{display_extension}.png"
      self.name = self.reldir / self.basename
      self.destdir = self.get_dest_dir(self.reldir)
  
      self.thumbnails = [
          self.generated_display,
          self.expected_display,
          self.diff,
      ]
      self.thumbnails = [self.dir / x for x in self.thumbnails]
  
      if not Path(self.destdir, self.generated).exists():
          # This case arises from a check_figures_equal test.
          self.status = "autogen"
      elif (self.dir / self.generated).read_bytes() == (
          self.destdir / self.generated
      ).read_bytes():
          self.status = "accept"
      else:
          self.status = "unknown"
  
imports: import os
  from pathlib import Path
  import shutil
  import sys
  from matplotlib.backends.qt_compat import QtCore, QtGui, QtWidgets
  from matplotlib.backends.qt_compat import _exec
label_desc: Use image node_id 1 to create a new Entry object  with example: obj = Entry(path, root, source)