mirror of
https://github.com/python/cpython.git
synced 2025-10-27 03:34:32 +00:00
gh-124402: Require cpu resource in test_free_threading (#124438)
Require the 'cpu' test resource on slow test_free_threading tests.
This commit is contained in:
parent
d21b0b5d36
commit
38a5beb12a
3 changed files with 8 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
from threading import Thread
|
||||
from unittest import TestCase
|
||||
|
||||
from test import support
|
||||
from test.support import threading_helper
|
||||
|
||||
|
||||
|
|
@ -13,6 +14,7 @@ def __init__(self, v):
|
|||
|
||||
@threading_helper.requires_working_threading()
|
||||
class TestList(TestCase):
|
||||
@support.requires_resource('cpu')
|
||||
def test_racing_iter_append(self):
|
||||
|
||||
l = []
|
||||
|
|
@ -42,6 +44,7 @@ def reader_func():
|
|||
for reader in readers:
|
||||
reader.join()
|
||||
|
||||
@support.requires_resource('cpu')
|
||||
def test_racing_iter_extend(self):
|
||||
iters = [
|
||||
lambda x: [x],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue