code: def test_get_selection(self):
      # text = Text(master=self.root)
      text = mockText()
      text.insert("1.0", "Hello World!")
  
      # fix text.index result when called in get_selection
      def sel(s):
          # select entire text, cursor irrelevant
          if s == "sel.first":
              return "1.0"
          if s == "sel.last":
              return "1.12"
          raise TclError
  
      text.index = sel  # replaces .tag_add('sel', '1.0, '1.12')
      self.assertEqual(se.get_selection(text), ("1.0", "1.12"))
  
      def mark(s):
          # no selection, cursor after 'Hello'
          if s == "insert":
              return "1.5"
          raise TclError
  
      text.index = mark  # replaces .mark_set('insert', '1.5')
      self.assertEqual(se.get_selection(text), ("1.5", "1.5"))
  
imports: from idlelib import searchengine
  import unittest
  from tkinter import BooleanVar, StringVar, TclError
  from tkinter import messagebox
  from idlelib.idle_test.mock_tk import Var, Mbox
  from idlelib.idle_test.mock_tk import Text
  import re
label_desc: Use image node_id 1 for calling the GetSelectionTest obj's underlying member method code with example usage: obj.test_get_selection() and returns: str, str, str