From 7aeb06f78ee4abba64ca2c5c7a848fd2616da6fb Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 17 Mar 2022 18:00:56 +0900 Subject: Do not run test_gdb when gdb embeds Python 2. (GH-31956) --- Lib/test/test_gdb.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py index 344fd3d..0f39b8f 100644 --- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -117,6 +117,9 @@ gdbpy_version, _ = run_gdb("--eval-command=python import sys; print(sys.version_ if not gdbpy_version: raise unittest.SkipTest("gdb not built with embedded python support") +if "major=2" in gdbpy_version: + raise unittest.SkipTest("gdb built with Python 2") + # Verify that "gdb" can load our custom hooks, as OS security settings may # disallow this without a customized .gdbinit. _, gdbpy_errors = run_gdb('--args', sys.executable) -- cgit v0.12