diff options
| -rw-r--r-- | Lib/test/test_gdb.py | 10 | ||||
| -rw-r--r-- | Misc/NEWS | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py index 2a7057c..3ade185 100644 --- a/Lib/test/test_gdb.py +++ b/Lib/test/test_gdb.py @@ -8,6 +8,7 @@ import re import subprocess import sys import unittest +import sysconfig from test.test_support import run_unittest, findfile @@ -678,6 +679,15 @@ class PyLocalsTests(DebuggerTests): r".*\na = 1\nb = 2\nc = 3\n.*") def test_main(): + cflags = sysconfig.get_config_vars()['PY_CFLAGS'] + final_opt = "" + for opt in cflags.split(): + if opt.startswith('-O'): + final_opt = opt + if final_opt and final_opt != '-O0': + raise unittest.SkipTest("Python was built with compiler optimizations, " + "tests can't reliably succeed") + run_unittest(PrettyPrintTests, PyListTests, StackNavigationTests, @@ -26,6 +26,11 @@ Library Extension Modules ----------------- +Tests +----- + +- Issue #8605: Skip test_gdb if Python is compiled with optimizations. + What's New in Python 2.7? ========================= |
