mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-90473: Skip test_queue when threading is not available (GH-93712)
(cherry picked from commit f0b7aa71c4)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
36ece2effb
commit
34ef12a350
1 changed files with 2 additions and 3 deletions
|
|
@ -10,6 +10,8 @@
|
|||
from test.support import import_helper
|
||||
from test.support import threading_helper
|
||||
|
||||
# queue module depends on threading primitives
|
||||
threading_helper.requires_working_threading(module=True)
|
||||
|
||||
py_queue = import_helper.import_fresh_module('queue', blocked=['_queue'])
|
||||
c_queue = import_helper.import_fresh_module('queue', fresh=['_queue'])
|
||||
|
|
@ -87,7 +89,6 @@ def do_exceptional_blocking_test(self,block_func, block_args, trigger_func,
|
|||
self.fail("trigger thread ended but event never set")
|
||||
|
||||
|
||||
@threading_helper.requires_working_threading()
|
||||
class BaseQueueTestMixin(BlockingTestMixin):
|
||||
def setUp(self):
|
||||
self.cum = 0
|
||||
|
|
@ -291,7 +292,6 @@ class CPriorityQueueTest(PriorityQueueTest, unittest.TestCase):
|
|||
class FailingQueueException(Exception): pass
|
||||
|
||||
|
||||
@threading_helper.requires_working_threading()
|
||||
class FailingQueueTest(BlockingTestMixin):
|
||||
|
||||
def setUp(self):
|
||||
|
|
@ -467,7 +467,6 @@ def consume_timeout(self, q, results, sentinel):
|
|||
return
|
||||
results.append(val)
|
||||
|
||||
@threading_helper.requires_working_threading()
|
||||
def run_threads(self, n_threads, q, inputs, feed_func, consume_func):
|
||||
results = []
|
||||
sentinel = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue