summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2017-10-18 12:05:16 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-10-18 12:05:16 (GMT)
commit97abcabc195b87d6a5562dbb867a469fac27d3f6 (patch)
tree89408afab9f30ae7c43ece4e0a60d29d98217bea /Lib/test
parentbe4e9cc769aac3cb46670c049b9f21e412be53d1 (diff)
downloadcpython-97abcabc195b87d6a5562dbb867a469fac27d3f6.zip
cpython-97abcabc195b87d6a5562dbb867a469fac27d3f6.tar.gz
cpython-97abcabc195b87d6a5562dbb867a469fac27d3f6.tar.bz2
[3.6] bpo-31334: Fix timeout in select.poll.poll() (GH-3277) (#4033)
Always pass -1, or INFTIM where defined, to the poll() system call when a negative timeout is passed to the poll.poll([timeout]) method in the select module. Various OSes throw an error with arbitrary negative values. (cherry picked from commit 6cfa927ceb931ad968b5b03e4a2bffb64a8a0604)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_poll.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_poll.py b/Lib/test/test_poll.py
index 2a39360..e8725c3 100644
--- a/Lib/test/test_poll.py
+++ b/Lib/test/test_poll.py
@@ -211,7 +211,7 @@ class PollTests(unittest.TestCase):
@unittest.skipUnless(threading, 'Threading required for this test.')
@reap_threads
def test_poll_blocks_with_negative_ms(self):
- for timeout_ms in [None, -1, -1.0, -0.1, -1e-100]:
+ for timeout_ms in [None, -1000, -1, -1.0, -0.1, -1e-100]:
# Create two file descriptors. This will be used to unlock
# the blocking call to poll.poll inside the thread
r, w = os.pipe()