diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-05-27 22:10:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-27 22:10:27 (GMT) |
commit | e80697d687b610bd7fb9104af905dec8f0bc55a7 (patch) | |
tree | c848b98eaec2d959237fda725cf47b059f34b12a /Lib/test/test_poll.py | |
parent | 7d80b35af1ee03834ae4af83e920dee89c2bc273 (diff) | |
download | cpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.zip cpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.tar.gz cpython-e80697d687b610bd7fb9104af905dec8f0bc55a7.tar.bz2 |
bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
Diffstat (limited to 'Lib/test/test_poll.py')
-rw-r--r-- | Lib/test/test_poll.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_poll.py b/Lib/test/test_poll.py index ef966bf..a14c69a 100644 --- a/Lib/test/test_poll.py +++ b/Lib/test/test_poll.py @@ -7,7 +7,8 @@ import select import threading import time import unittest -from test.support import TESTFN, run_unittest, reap_threads, cpython_only +from test.support import TESTFN, run_unittest, cpython_only +from test.support import threading_helper try: select.poll @@ -175,7 +176,7 @@ class PollTests(unittest.TestCase): self.assertRaises(OverflowError, pollster.poll, INT_MAX + 1) self.assertRaises(OverflowError, pollster.poll, UINT_MAX + 1) - @reap_threads + @threading_helper.reap_threads def test_threaded_poll(self): r, w = os.pipe() self.addCleanup(os.close, r) @@ -204,7 +205,7 @@ class PollTests(unittest.TestCase): t.join() @unittest.skipUnless(threading, 'Threading required for this test.') - @reap_threads + @threading_helper.reap_threads def test_poll_blocks_with_negative_ms(self): for timeout_ms in [None, -1000, -1, -1.0, -0.1, -1e-100]: # Create two file descriptors. This will be used to unlock |