(root)/
Python-3.11.7/
Lib/
test/
test_gdb/
__init__.py
       1  # Verify that gdb can pretty-print the various PyObject* types
       2  #
       3  # The code for testing gdb was adapted from similar work in Unladen Swallow's
       4  # Lib/test/test_jit_gdb.py
       5  
       6  import os
       7  import sysconfig
       8  import unittest
       9  from test import support
      10  
      11  
      12  if support.MS_WINDOWS:
      13      # On Windows, Python is usually built by MSVC. Passing /p:DebugSymbols=true
      14      # option to MSBuild produces PDB debug symbols, but gdb doesn't support PDB
      15      # debug symbol files.
      16      raise unittest.SkipTest("test_gdb doesn't work on Windows")
      17  
      18  if support.PGO:
      19      raise unittest.SkipTest("test_gdb is not useful for PGO")
      20  
      21  if not sysconfig.is_python_build():
      22      raise unittest.SkipTest("test_gdb only works on source builds at the moment.")
      23  
      24  if support.check_cflags_pgo():
      25      raise unittest.SkipTest("test_gdb is not reliable on PGO builds")
      26  
      27  
      28  def load_tests(*args):
      29      return support.load_package_tests(os.path.dirname(__file__), *args)