Require the 'cpu' test resource on slow test_free_threading tests.
from threading import Thread
from unittest import TestCase
+from test import support
from test.support import threading_helper
@threading_helper.requires_working_threading()
class TestList(TestCase):
+ @support.requires_resource('cpu')
def test_racing_iter_append(self):
l = []
for reader in readers:
reader.join()
+ @support.requires_resource('cpu')
def test_racing_iter_extend(self):
iters = [
lambda x: [x],
import weakref
from sys import monitoring
+from test import support
from test.support import threading_helper
from threading import Thread, _PyRLock
from unittest import TestCase
"""Runs once after the test is done"""
pass
+ @support.requires_resource('cpu')
def test_instrumentation(self):
# Setup a bunch of functions which will need instrumentation...
funcs = []
for ref in self.refs:
self.assertEqual(ref(), None)
+ @support.requires_resource('cpu')
def test_set_local_trace_opcodes(self):
def trace(frame, event, arg):
frame.f_trace_opcodes = True
from threading import Thread
from unittest import TestCase
+from test import support
from test.support import threading_helper
self.run_one(writer_func, reader_func)
+ @support.requires_resource('cpu')
def test___class___modification(self):
class Foo:
pass