]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-124402: Require cpu resource in test_super slow method (#124434)
authorVictor Stinner <vstinner@python.org>
Tue, 24 Sep 2024 20:36:45 +0000 (22:36 +0200)
committerGitHub <noreply@github.com>
Tue, 24 Sep 2024 20:36:45 +0000 (22:36 +0200)
test___class___modification_multithreaded() now requires the 'cpu'
test resource on a Free Threaded build.

Lib/test/test_super.py

index 3ffbe03f0c2f1108818d42c7b3d04f185092d5ef..b0d1f12513d4044411af68dcf95ae44c1495bc8c 100644 (file)
@@ -4,6 +4,7 @@ import textwrap
 import threading
 import unittest
 from unittest.mock import patch
+from test import support
 from test.support import import_helper, threading_helper
 
 
@@ -513,6 +514,11 @@ class TestSuper(unittest.TestCase):
         This should be the case anyways as our test suite sets
         an audit hook.
         """
+
+        if support.Py_GIL_DISABLED:
+            # gh-124402: On a Free Threaded build, the test takes a few minutes
+            support.requires('cpu')
+
         class Foo:
             pass