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
 def test_init_close(self):
     instance = ft.FormatParagraph('editor')
     self.assertEqual(instance.editwin, 'editor')
     instance.close()
     self.assertEqual(instance.editwin, None)