class_docstr: Test the formatting of text inside a Text widget.
  
  This is done with FormatParagraph.format.paragraph_event,
  which calls functions in the module as appropriate.
class_docstr_tok: ["Test","the","formatting","of","text","inside","a","Text","widget",".","This","is","done","with","FormatParagraph.format.paragraph_event",",","which","calls","functions","in","the","module","as","appropriate","."]
code: def setUpClass(cls):
      requires("gui")
      cls.root = Tk()
      cls.root.withdraw()
      editor = Editor(root=cls.root)
      cls.text = (
          editor.text.text
      )  # Test code does not need the wrapper.
      cls.formatter = ft.FormatParagraph(editor).format_paragraph_event
  
imports: from idlelib import format
  import unittest
  from unittest import mock
  from test.support import requires
  from tkinter import Tk, Text
  from idlelib.editor import EditorWindow
  from idlelib.idle_test.mock_idle import Editor
label_desc: Use image node_id 1 for calling the FormatEventTest obj's underlying member method code with example usage: obj.setUpClass(cls) without return types