Skip to content

Commit

Permalink
gh-90473: Skip test_queue when threading is not available (GH-93712)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran authored Jun 11, 2022
1 parent dc5e02b commit f0b7aa7
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit f0b7aa7

Please sign in to comment.