]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90473: Skip test_queue when threading is not available (GH-93712)
authorChristian Heimes <christian@python.org>
Sat, 11 Jun 2022 09:55:11 +0000 (11:55 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Jun 2022 09:55:11 +0000 (11:55 +0200)
Lib/test/test_queue.py

index e3080376a9de5fdba6fffe9cc9607a6736e6291d..33113a72e6b6a9d787e3ca08c61b5663d264d85e 100644 (file)
@@ -10,6 +10,8 @@ from test.support import gc_collect
 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 @@ class BlockingTestMixin:
                 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 @@ class BaseSimpleQueueTest:
                 return
             results.append(val)
 
-    @threading_helper.requires_working_threading()
     def run_threads(self, n_threads, q, inputs, feed_func, consume_func):
         results = []
         sentinel = None