summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_gdb.py')
-rw-r--r--Lib/test/test_gdb.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index 8500908..c05a2d3 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -317,6 +317,7 @@ class PrettyPrintTests(DebuggerTests):
('%r did not equal expected %r; full output was:\n%s'
% (gdb_repr, exp_repr, gdb_output)))
+ @support.requires_resource('cpu')
def test_int(self):
'Verify the pretty-printing of various int values'
self.assertGdbRepr(42)
@@ -343,6 +344,7 @@ class PrettyPrintTests(DebuggerTests):
self.assertGdbRepr([])
self.assertGdbRepr(list(range(5)))
+ @support.requires_resource('cpu')
def test_bytes(self):
'Verify the pretty-printing of bytes'
self.assertGdbRepr(b'')
@@ -357,6 +359,7 @@ class PrettyPrintTests(DebuggerTests):
self.assertGdbRepr(bytes([b for b in range(255)]))
+ @support.requires_resource('cpu')
def test_strings(self):
'Verify the pretty-printing of unicode strings'
# We cannot simply call locale.getpreferredencoding() here,
@@ -407,6 +410,7 @@ class PrettyPrintTests(DebuggerTests):
self.assertGdbRepr((1,), '(1,)')
self.assertGdbRepr(('foo', 'bar', 'baz'))
+ @support.requires_resource('cpu')
def test_sets(self):
'Verify the pretty-printing of sets'
if (gdb_major_version, gdb_minor_version) < (7, 3):
@@ -425,6 +429,7 @@ s.remove('a')
id(s)''')
self.assertEqual(gdb_repr, "{'b'}")
+ @support.requires_resource('cpu')
def test_frozensets(self):
'Verify the pretty-printing of frozensets'
if (gdb_major_version, gdb_minor_version) < (7, 3):
@@ -828,6 +833,7 @@ Traceback \(most recent call first\):
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
+ @support.requires_resource('cpu')
def test_threads(self):
'Verify that "py-bt" indicates threads that are waiting for the GIL'
cmd = '''
@@ -889,6 +895,7 @@ id(42)
@unittest.skipIf(python_is_optimized(),
"Python was compiled with optimizations")
+ @support.requires_resource('cpu')
# Some older versions of gdb will fail with
# "Cannot find new threads: generic error"
# unless we add LD_PRELOAD=PATH-TO-libpthread.so.1 as a workaround