code: def setUpClass(cls):
      ##        requires('gui')
      ##        cls.root = Tk()
      ##        cls.text = Text(master=cls.root)
      cls.text = mockText()
      test_text = "First line\n" "Line with target\n" "Last line\n"
      cls.text.insert("1.0", test_text)
      cls.pat = re.compile("target")
  
      cls.engine = se.SearchEngine(None)
      cls.engine.search_forward = lambda *args: ("f", args)
      cls.engine.search_backward = lambda *args: ("b", args)
  
imports: import re
  import unittest
  from Tkinter import BooleanVar, StringVar, TclError
  import tkMessageBox
  from idlelib import SearchEngine
  from idlelib.idle_test.mock_tk import Var, Mbox
  from idlelib.idle_test.mock_tk import Text
label_desc: Use image node_id 1 for calling the SearchTest obj's underlying member method code with example usage: obj.setUpClass(cls) without return types