code: def test_jumptoline(self):
      eq = self.assertEqual
      cc = self.cc
      jump = cc.jumptoline
  
      if not cc.context:
          cc.toggle_code_context_event()
  
      # Empty context.
      cc.text.yview("2.0")
      cc.update_code_context()
      eq(cc.topvisible, 2)
      cc.context.mark_set("insert", "1.5")
      jump()
      eq(cc.topvisible, 1)
  
      # 4 lines of context showing.
      cc.text.yview("12.0")
      cc.update_code_context()
      eq(cc.topvisible, 12)
      cc.context.mark_set("insert", "3.0")
      jump()
      eq(cc.topvisible, 8)
  
      # More context lines than limit.
      cc.context_depth = 2
      cc.text.yview("12.0")
      cc.update_code_context()
      eq(cc.topvisible, 12)
      cc.context.mark_set("insert", "1.0")
      jump()
      eq(cc.topvisible, 8)
  
      # Context selection stops jump.
      cc.text.yview("5.0")
      cc.update_code_context()
      cc.context.tag_add("sel", "1.0", "2.0")
      cc.context.mark_set("insert", "1.0")
      jump()  # Without selection, to line 2.
      eq(cc.topvisible, 5)
  
imports: from idlelib import codecontext
  import unittest
  import unittest.mock
  from test.support import requires
  from tkinter import NSEW, Tk, Frame, Text, TclError
  from unittest import mock
  import re
  from idlelib import config
label_desc: Use image node_id 12 for calling the CodeContextTest obj's underlying member method code with example usage: obj.test_jumptoline() without return types