code: def testLoadTkFailure(self):
      old_display = None
      if sys.platform.startswith(("win", "darwin", "cygwin")):
          # no failure possible on windows?
  
          # XXX Maybe on tk older than 8.4.13 it would be possible,
          # see tkinter.h.
          return
      with os_helper.EnvironmentVarGuard() as env:
          if "DISPLAY" in os.environ:
              del env["DISPLAY"]
              # on some platforms, deleting environment variables
              # doesn't actually carry through to the process level
              # because they don't support unsetenv
              # If that's the case, abort.
              with os.popen("echo $DISPLAY") as pipe:
                  display = pipe.read().strip()
              if display:
                  return
  
          tcl = Tcl()
          self.assertRaises(TclError, tcl.winfo_geometry)
          self.assertRaises(TclError, tcl.loadtk)
  
file_path: cpython/Lib/test/test_tkinter/test_loadtk.py
imports: import os
  import sys
  import unittest
  import test.support
  from test.support import os_helper
  from tkinter import Tcl, TclError
label_desc: Use image node_id 2 for calling the TkLoadTest obj's underlying member method code with example usage: obj.testLoadTkFailure() without return types