mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-38614: Use support timeout constants (GH-17572)
This commit is contained in:
parent
0d63bacefd
commit
7772b1af5e
5 changed files with 67 additions and 36 deletions
|
@ -1144,7 +1144,7 @@ class _TestQueue(BaseTestCase):
|
|||
q = self.Queue()
|
||||
q.put(NotSerializable())
|
||||
q.put(True)
|
||||
self.assertTrue(q.get(timeout=support.LONG_TIMEOUT))
|
||||
self.assertTrue(q.get(timeout=support.SHORT_TIMEOUT))
|
||||
close_queue(q)
|
||||
|
||||
with test.support.captured_stderr():
|
||||
|
@ -1159,8 +1159,7 @@ class _TestQueue(BaseTestCase):
|
|||
# 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
|
||||
self.assertTrue(q.get(timeout=1.0))
|
||||
self.assertTrue(q.get(timeout=support.SHORT_TIMEOUT))
|
||||
# Check that the size of the queue is correct
|
||||
self.assertTrue(q.empty())
|
||||
close_queue(q)
|
||||
|
@ -1197,7 +1196,7 @@ class _TestQueue(BaseTestCase):
|
|||
|
||||
# Verify that q is still functioning correctly
|
||||
q.put(True)
|
||||
self.assertTrue(q.get(timeout=1.0))
|
||||
self.assertTrue(q.get(timeout=support.SHORT_TIMEOUT))
|
||||
|
||||
# Assert that the serialization and the hook have been called correctly
|
||||
self.assertTrue(not_serializable_obj.reduce_was_called)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue