gh-134578: Mark more slow tests (GH-134579)

This commit is contained in:
Serhiy Storchaka 2025-05-23 19:59:10 +03:00 committed by GitHub
parent fc0c9c2412
commit 77eade39f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 0 deletions

View file

@ -3292,6 +3292,7 @@ class CommandLineTests(unittest.TestCase):
expect = self.text_normalize(expect)
self.assertEqual(res, expect)
@support.requires_resource('cpu')
def test_invocation(self):
# test various combinations of parameters
base_flags = (

View file

@ -221,6 +221,7 @@ class CAPITest(unittest.TestCase):
"""
self.check_negative_refcount(code)
@support.requires_resource('cpu')
def test_decref_delayed(self):
# gh-130519: Test that _PyObject_XDecRefDelayed() and QSBR code path
# handles destructors that are possibly re-entrant or trigger a GC.

View file

@ -542,6 +542,8 @@ class TestNamedTuple(unittest.TestCase):
self.assertEqual(Dot(1)._replace(d=999), (999,))
self.assertEqual(Dot(1)._fields, ('d',))
@support.requires_resource('cpu')
def test_large_size(self):
n = support.exceeds_recursion_limit()
names = list(set(''.join([choice(string.ascii_letters)
for j in range(10)]) for i in range(n)))

View file

@ -86,6 +86,7 @@ class TestRecursion:
@support.skip_wasi_stack_overflow()
@support.skip_emscripten_stack_overflow()
@support.requires_resource('cpu')
def test_highly_nested_objects_encoding(self):
# See #12051
l, d = [], {}

View file

@ -2346,6 +2346,7 @@ class TestGeometricMean(unittest.TestCase):
class TestKDE(unittest.TestCase):
@support.requires_resource('cpu')
def test_kde(self):
kde = statistics.kde
StatisticsError = statistics.StatisticsError