summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_selectors.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-251-1/+2
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-29255: Wait in KqueueSelector.select when no fds are registered (GH-19508)Russell Davis2020-04-151-0/+13
| | | | Also partially fixes bpo-25680 (there's still a discrepancy in behavior on Windows that needs to be fixed).
* bpo-33522: Enable CI builds on Visual Studio Team Services (#6865)Steve Dower2018-05-161-1/+8
|
* bpo-31479: Always reset the signal alarm in tests (#3588)Victor Stinner2017-09-191-18/+22
| | | | | | | | | | | | | * bpo-31479: Always reset the signal alarm in tests Use "try: ... finally: signal.signal(0)" pattern to make sure that tests don't "leak" a pending fatal signal alarm. * Move two more alarm() calls into the try block Fix also typo: replace signal.signal(0) with signal.alarm(0) * Move another signal.alarm() into the try block
* bpo-30014: make poll-like selector's modify() method faster (#1030)Giampaolo Rodola2017-06-091-0/+27
| | | | | | | | | | | | | | | | * #30014: make selectors.DefaultSelector.modify() faster by relying on selector's modify() method instead of un/register()ing the fd * #30014: add unit test * speedup poll/epoll/devpoll modify() method by using internal modify() call * update doc * address PR comments * update NEWS entries * use != instead of 'is not'
* Issue #27759: Fix selectors incorrectly retain invalid file descriptors.Yury Selivanov2016-09-151-0/+23
| | | | Patch by Mark Williams.
* Issue #23485: Enhance and update selectors doc and test_selectorsVictor Stinner2015-03-311-3/+34
| | | | | | | | Selector.select() is now retried with the recomputed timeout when interrupted by a signal. Write an unit test with a signal handler raising an exception, and a unit with a signal handler which does not raise an exception (it does nothing).
* Merge 3.4Victor Stinner2015-01-221-0/+2
|\
| * Issue #23009: Skip test_selectors.test_empty_select() on WindowsVictor Stinner2015-01-221-0/+4
| |
* | Issue #23209, #23225: selectors.BaseSelector.get_key() now raises aVictor Stinner2015-01-131-4/+7
|\ \ | |/ | | | | | | | | RuntimeError if the selector is closed. And selectors.BaseSelector.close() now clears its internal reference to the selector mapping to break a reference cycle. Initial patch written by Martin Richard.
| * Issue #23209, #23225: selectors.BaseSelector.close() now clears its internalVictor Stinner2015-01-131-0/+3
| | | | | | | | | | reference to the selector mapping to break a reference cycle. Initial patch written by Martin Richard.
* | Issue #23009: Skip test_selectors.test_empty_select() on WindowsVictor Stinner2014-12-171-0/+3
| |
* | Merge 3.4 (test_selectors)Victor Stinner2014-12-121-1/+2
|\ \ | |/
| * test_selectors: Tolerate 2.0 seconds instead of 1.6 sec for very slow buildbotsVictor Stinner2014-12-121-1/+2
| |
* | selectors: Make sure EpollSelecrtor.select() works when no FD is registered.Yury Selivanov2014-12-081-0/+5
|\ \ | |/ | | | | Closes issue #23009.
| * selectors: Make sure EpollSelecrtor.select() works when no FD is registered.Yury Selivanov2014-12-081-0/+5
| | | | | | | | Closes issue #23009.
* | Issue #22043: time.monotonic() is now always availableVictor Stinner2014-09-021-4/+1
| | | | | | | | | | threading.Lock.acquire(), threading.RLock.acquire() and socket operations now use a monotonic clock, instead of the system clock, when a timeout is used.
* | Issue #21566: Make use of socket.listen() default backlog.Charles-François Natali2014-07-231-1/+1
| |
* | Issue #21901: Cap the maximum number of file descriptors to use for the test.Charles-François Natali2014-07-221-1/+1
|\ \ | |/
| * Issue #21901: Cap the maximum number of file descriptors to use for the test.Charles-François Natali2014-07-221-1/+1
| |
* | Fix issue 18931: selectors module now supports /dev/poll on Solaris.Giampaolo Rodola'2014-03-201-1/+9
|/
* Issue #20505: Remove resolution and _granularity from selectors and asyncioVictor Stinner2014-02-071-5/+0
| | | | | * Remove selectors.BaseSelector.resolution attribute * Remove asyncio.BaseEventLoop._granularity attribute
* test_selectors: remove unused importsVictor Stinner2014-01-251-1/+1
|
* Issue #20311: selectors: Add a resolution attribute to BaseSelector.Victor Stinner2014-01-251-0/+5
|
* Issue #20311: Revert e042ea77a152 and 7ce7295393c2, PollSelector.select() andVictor Stinner2014-01-251-19/+0
| | | | EpollSelector.select() round again the timeout towards zero
* Issue #20311: add debug help in test_selectorsVictor Stinner2014-01-231-2/+5
|
* Issue #20311: selector.PollSelector.select() now rounds the timeout away fromVictor Stinner2014-01-211-1/+17
| | | | | | | | zero, instead of rounding towards zero. For example, a timeout of one microsecond is now rounded to one millisecond, instead of being rounded to zero. Move also a test in test_epoll which was moved by my previous merge.
* Backed out changeset c4c1c4bc8086Victor Stinner2013-12-091-1/+1
|
* Issue #19876: Run also ↵Victor Stinner2013-12-091-1/+1
| | | | | | test_selectors.test_unregister_after_fd_close_and_reuse() on Windows os.dup2() is available on Windows.
* Fix test_selectors failure introduced by 39e7995f9ad1.Charles-François Natali2013-12-081-0/+1
|
* Silently ignore unregistering closed files. Fixes issue 19876. With docs and ↵Guido van Rossum2013-12-071-37/+59
| | | | slight test refactor.
* test_selectors: test_timeout fails sometimes on busy (slow) buildbots, relaxVictor Stinner2013-11-171-1/+2
| | | | | | | | | | | | | | the unit test on max time (but be more strict on mon time). Example of failure: http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/6978/steps/test/logs/stdio ====================================================================== FAIL: test_timeout (test.test_selectors.PollSelectorTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_selectors.py", line 316, in test_timeout self.assertTrue(0.5 < t1 - t0 < 1.5, t1 - t0) AssertionError: False is not true : 1.5033390671014786
* Optimize BaseSelector.modify(). Patch by Arnaud Faure.Guido van Rossum2013-11-071-0/+10
|
* Issue #19172: Add a get_map() method to selectors.Charles-François Natali2013-10-301-0/+27
|
* test_selectors: make timeout-related errors report the actual elapsed timeout.Charles-François Natali2013-10-251-4/+5
|
* test_selectors: rename test_interrupted_retry() (since it doesn't actuallyCharles-François Natali2013-10-251-1/+1
| | | | retry on EINTR).
* Issue #18963: skip test_selectors.test_above_fd_setsize on older OS X versions.Charles-François Natali2013-09-081-0/+2
|
* Issue #18963: Fix test_selectors.test_above_fd_setsize on OS X, where theCharles-François Natali2013-09-081-2/+1
| | | | default RLIMIT_NOFILE hard limit can be RLIMIT_INFINITY.
* Issue #16853: Add new selectors module.Charles-François Natali2013-09-041-0/+390