Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-90473: Skip test_queue when threading is not available (GH-93712) #93712

Merged
merged 1 commit into from
Jun 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Lib/test/test_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -291,7 +292,6 @@ class CPriorityQueueTest(PriorityQueueTest, unittest.TestCase):
class FailingQueueException(Exception): pass


@threading_helper.requires_working_threading()
class FailingQueueTest(BlockingTestMixin):

def setUp(self):
Expand Down Expand Up @@ -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
Expand Down