File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
Lib/test/test_free_threading Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 33from threading import Thread
44from unittest import TestCase
55
6+ from test import support
67from test .support import threading_helper
78
89
@@ -13,6 +14,7 @@ def __init__(self, v):
1314
1415@threading_helper .requires_working_threading ()
1516class TestList (TestCase ):
17+ @support .requires_resource ('cpu' )
1618 def test_racing_iter_append (self ):
1719
1820 l = []
@@ -42,6 +44,7 @@ def reader_func():
4244 for reader in readers :
4345 reader .join ()
4446
47+ @support .requires_resource ('cpu' )
4548 def test_racing_iter_extend (self ):
4649 iters = [
4750 lambda x : [x ],
Original file line number Diff line number Diff line change 77import weakref
88
99from sys import monitoring
10+ from test import support
1011from test .support import threading_helper
1112from threading import Thread , _PyRLock
1213from unittest import TestCase
@@ -43,6 +44,7 @@ def after_test(self):
4344 """Runs once after the test is done"""
4445 pass
4546
47+ @support .requires_resource ('cpu' )
4648 def test_instrumentation (self ):
4749 # Setup a bunch of functions which will need instrumentation...
4850 funcs = []
@@ -218,6 +220,7 @@ def test_register_callback(self):
218220 for ref in self .refs :
219221 self .assertEqual (ref (), None )
220222
223+ @support .requires_resource ('cpu' )
221224 def test_set_local_trace_opcodes (self ):
222225 def trace (frame , event , arg ):
223226 frame .f_trace_opcodes = True
Original file line number Diff line number Diff line change 55from threading import Thread
66from unittest import TestCase
77
8+ from test import support
89from test .support import threading_helper , import_helper
910
1011
@@ -96,6 +97,7 @@ def reader_func():
9697
9798 self .run_one (writer_func , reader_func )
9899
100+ @support .requires_resource ('cpu' )
99101 def test___class___modification (self ):
100102 class Foo :
101103 pass
You can’t perform that action at this time.
0 commit comments