]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-134578: Mark more slow tests (GH-134579)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 23 May 2025 16:59:10 +0000 (19:59 +0300)
committerGitHub <noreply@github.com>
Fri, 23 May 2025 16:59:10 +0000 (19:59 +0300)
Lib/test/test_ast/test_ast.py
Lib/test/test_capi/test_object.py
Lib/test/test_collections.py
Lib/test/test_json/test_recursion.py
Lib/test/test_statistics.py

index 1479a8eafd62ec943a66effbfae2e551227aee51..46745cfa8f832560f50c9a33b7ef773331a87e36 100644 (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 = (
index cd772120bdee2be03cf985eb07dbad10607f694f..d4056727d07fbf2a7bb7ad99e3f7af4a4386277a 100644 (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.
index 1e93530398be79ba3cb3dbb0c2f1c83d18448505..d9d61e5c2053e33645f6629dc00c9498d34d874e 100644 (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)))
index 8f0e5e078ed0d4876d9fdcc259cbff826c283716..5d7b56ff9ad28580064ddd3c0d866f2127b716e5 100644 (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 = [], {}
index 5980f93918596519051fe3d8c939d743a33b1bd5..0dd619dd7c8ceb73429818a861153d9669acede8 100644 (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