summaryrefslogtreecommitdiff
path: root/Lib/test/test_sched.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-05-28 06:10:27 +0800
committerGitHub <noreply@github.com>2020-05-28 00:10:27 +0200
commite80697d687b610bd7fb9104af905dec8f0bc55a7 (patch)
treec848b98eaec2d959237fda725cf47b059f34b12a /Lib/test/test_sched.py
parent7d80b35af1ee03834ae4af83e920dee89c2bc273 (diff)
downloadcpython-git-e80697d687b610bd7fb9104af905dec8f0bc55a7.tar.gz
bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
Diffstat (limited to 'Lib/test/test_sched.py')
-rw-r--r--Lib/test/test_sched.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_sched.py b/Lib/test/test_sched.py
index 26cb4be81e..491d7b3a74 100644
--- a/Lib/test/test_sched.py
+++ b/Lib/test/test_sched.py
@@ -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)