diff options
author | Riccardo Coccioli <volans-@users.noreply.github.com> | 2017-10-17 19:45:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-10-17 19:45:07 (GMT) |
commit | 6cfa927ceb931ad968b5b03e4a2bffb64a8a0604 (patch) | |
tree | 855bb4cc90ec73fbcd093d09a4df313c92850e75 /Lib | |
parent | 2c15b29aea5d6b9c61aa42d2c24a07ff1edb4b46 (diff) | |
download | cpython-6cfa927ceb931ad968b5b03e4a2bffb64a8a0604.zip cpython-6cfa927ceb931ad968b5b03e4a2bffb64a8a0604.tar.gz cpython-6cfa927ceb931ad968b5b03e4a2bffb64a8a0604.tar.bz2 |
bpo-31334: Fix timeout in select.poll.poll() (GH-3277)
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.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_poll.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_poll.py b/Lib/test/test_poll.py index 028dd2d..d593495 100644 --- a/Lib/test/test_poll.py +++ b/Lib/test/test_poll.py @@ -207,7 +207,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() |