code: def test_init(self):
      redir = WidgetRedirector(self.text)
      self.assertEqual(redir.widget, self.text)
      self.assertEqual(redir.tk, self.text.tk)
      self.assertRaises(TclError, WidgetRedirector, self.text)
      redir.close()
  
imports: from idlelib.redirector import WidgetRedirector
  import unittest
  from test.support import requires
  from tkinter import Tk, Text, TclError
  from idlelib.idle_test.mock_idle import Func
label_desc: Use image node_id 3 for calling the InitCloseTest obj's underlying member method code with example usage: obj.test_init() without return types