mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
This commit is contained in:
parent
7d80b35af1
commit
e80697d687
46 changed files with 483 additions and 428 deletions
|
@ -4,6 +4,7 @@ import threading
|
|||
import time
|
||||
import unittest
|
||||
from test import support
|
||||
from test.support import threading_helper
|
||||
|
||||
|
||||
TIMEOUT = support.SHORT_TIMEOUT
|
||||
|
@ -82,7 +83,7 @@ class TestCase(unittest.TestCase):
|
|||
self.assertEqual(q.get(timeout=TIMEOUT), 5)
|
||||
self.assertTrue(q.empty())
|
||||
timer.advance(1000)
|
||||
support.join_thread(t)
|
||||
threading_helper.join_thread(t)
|
||||
self.assertTrue(q.empty())
|
||||
self.assertEqual(timer.time(), 5)
|
||||
|
||||
|
@ -137,7 +138,7 @@ class TestCase(unittest.TestCase):
|
|||
self.assertEqual(q.get(timeout=TIMEOUT), 4)
|
||||
self.assertTrue(q.empty())
|
||||
timer.advance(1000)
|
||||
support.join_thread(t)
|
||||
threading_helper.join_thread(t)
|
||||
self.assertTrue(q.empty())
|
||||
self.assertEqual(timer.time(), 4)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue