summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-09-24 20:36:45 (GMT)
committerGitHub <noreply@github.com>2024-09-24 20:36:45 (GMT)
commit5a605660745d32a9b9f4208666889c702527208c (patch)
treefa4d79a8ac20fc1f27629ab059907dc8fe9db65e /Lib
parentb169cf394fe70dfbc7bbe22ae703be3b21845add (diff)
downloadcpython-5a605660745d32a9b9f4208666889c702527208c.zip
cpython-5a605660745d32a9b9f4208666889c702527208c.tar.gz
cpython-5a605660745d32a9b9f4208666889c702527208c.tar.bz2
gh-124402: Require cpu resource in test_super slow method (#124434)
test___class___modification_multithreaded() now requires the 'cpu' test resource on a Free Threaded build.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_super.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_super.py b/Lib/test/test_super.py
index 3ffbe03..b0d1f12 100644
--- a/Lib/test/test_super.py
+++ b/Lib/test/test_super.py
@@ -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