mirror of
https://github.com/python/cpython.git
synced 2025-10-02 13:22:19 +00:00
FIX failure on OSX sem_getvalue (GH-6180) (GH-6181)
(cherry picked from commit dec1c7786f
)
Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
This commit is contained in:
parent
bb5b529197
commit
f5625d58fa
2 changed files with 8 additions and 2 deletions
|
@ -1062,11 +1062,16 @@ class _TestQueue(BaseTestCase):
|
||||||
q = self.Queue(maxsize=1)
|
q = self.Queue(maxsize=1)
|
||||||
q.put(NotSerializable())
|
q.put(NotSerializable())
|
||||||
q.put(True)
|
q.put(True)
|
||||||
self.assertEqual(q.qsize(), 1)
|
try:
|
||||||
|
self.assertEqual(q.qsize(), 1)
|
||||||
|
except NotImplementedError:
|
||||||
|
# qsize is not available on all platform as it
|
||||||
|
# relies on sem_getvalue
|
||||||
|
pass
|
||||||
# bpo-30595: use a timeout of 1 second for slow buildbots
|
# bpo-30595: use a timeout of 1 second for slow buildbots
|
||||||
self.assertTrue(q.get(timeout=1.0))
|
self.assertTrue(q.get(timeout=1.0))
|
||||||
# Check that the size of the queue is correct
|
# Check that the size of the queue is correct
|
||||||
self.assertEqual(q.qsize(), 0)
|
self.assertTrue(q.empty())
|
||||||
close_queue(q)
|
close_queue(q)
|
||||||
|
|
||||||
def test_queue_feeder_on_queue_feeder_error(self):
|
def test_queue_feeder_on_queue_feeder_error(self):
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix the failure on OSX caused by the tests relying on sem_getvalue
|
Loading…
Add table
Add a link
Reference in a new issue