[Python-checkins] gh-90473: Skip test_queue when threading is not available (GH-93712)
miss-islington
webhook-mailer at python.org
Sat Jun 11 06:20:32 EDT 2022
https://github.com/python/cpython/commit/34ef12a3506da6a31df4b3bda16249b76ae1ff4f
commit: 34ef12a3506da6a31df4b3bda16249b76ae1ff4f
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022年06月11日T03:20:28-07:00
summary:
gh-90473: Skip test_queue when threading is not available (GH-93712)
(cherry picked from commit f0b7aa71c4a1330294c14b0c6f02e6c43e09c317)
Co-authored-by: Christian Heimes <christian at python.org>
files:
M Lib/test/test_queue.py
diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py
index e3080376a9de5..33113a72e6b6a 100644
--- a/Lib/test/test_queue.py
+++ b/Lib/test/test_queue.py
@@ -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")
- at 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
- at 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
More information about the Python-checkins
mailing list