Skip to content

Commit 34ef12a

Browse files
gh-90473: Skip test_queue when threading is not available (GH-93712)
(cherry picked from commit f0b7aa7) Co-authored-by: Christian Heimes <christian@python.org>
1 parent 36ece2e commit 34ef12a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_queue.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
from test.support import import_helper
1111
from test.support import threading_helper
1212

13+
# queue module depends on threading primitives
14+
threading_helper.requires_working_threading(module=True)
1315

1416
py_queue = import_helper.import_fresh_module('queue', blocked=['_queue'])
1517
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,
8789
self.fail("trigger thread ended but event never set")
8890

8991

90-
@threading_helper.requires_working_threading()
9192
class BaseQueueTestMixin(BlockingTestMixin):
9293
def setUp(self):
9394
self.cum = 0
@@ -291,7 +292,6 @@ class CPriorityQueueTest(PriorityQueueTest, unittest.TestCase):
291292
class FailingQueueException(Exception): pass
292293

293294

294-
@threading_helper.requires_working_threading()
295295
class FailingQueueTest(BlockingTestMixin):
296296

297297
def setUp(self):
@@ -467,7 +467,6 @@ def consume_timeout(self, q, results, sentinel):
467467
return
468468
results.append(val)
469469

470-
@threading_helper.requires_working_threading()
471470
def run_threads(self, n_threads, q, inputs, feed_func, consume_func):
472471
results = []
473472
sentinel = None

0 commit comments

Comments
 (0)