summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncore.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-251-6/+7
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-38614: Use default join_thread() timeout in tests (GH-17559)Victor Stinner2019-12-101-3/+2
| | | | | Tests no longer pass a timeout value to join_thread() of test.support: use the default join_thread() timeout instead (SHORT_TIMEOUT constant of test.support).
* bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182)Victor Stinner2018-12-171-2/+2
| | | | | | | Replace time.time() with time.monotonic() in tests to measure time delta. test_zipfile64: display progress every minute (60 secs) rather than every 5 minutes (5*60 seconds).
* bpo-32331: Fix socket.type when SOCK_NONBLOCK is available (#4877)Yury Selivanov2017-12-191-7/+3
|
* bpo-31234: Add support.join_thread() helper (#3587)Victor Stinner2017-09-141-6/+2
| | | | join_thread() joins a thread but raises an AssertionError if the thread is still alive after timeout seconds.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-6/+1
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-30980: Fix double close in asyncore.file_wrapper (#2789)Nir Soffer2017-07-241-1/+4
| | | | | | | | | | | | | | | * bpo-30980: Fix close test to fail test_close_twice was not considering the fact that file_wrapper is duping the file descriptor. Closing the original descriptor left the duped one open, hiding the fact that close protection is not effective. * bpo-30980: Fix double close protection Invalidated self.fd before closing, handling correctly the case when os.close raises. * bpo-30980: Fix fd leak introduced in the fixed test
* bpo-30106: Fix test_asyncore.test_quick_connect() (#1234)Victor Stinner2017-04-211-1/+2
| | | | | | | | | | test_quick_connect() runs a thread up to 50 seconds, whereas the socket is connected in 0.2 second and then the thread is expected to end in less than 3 second. On Linux, the thread ends quickly because select() seems to always return quickly. On FreeBSD, sometimes select() fails with timeout and so the thread runs much longer than expected. Fix the thread timeout to fix a race condition in the test.
* bpo-30106: Fix tearDown() of test_asyncore (#1194)Victor Stinner2017-04-201-2/+2
| | | | | | | | | Call asyncore.close_all() with ignore_all=True in the tearDown() method of the test_asyncore base test case. It should prevent keeping alive sockets in asyncore.socket_map if close() fails with an unexpected error. Revert also an unwanted change of my previous commit: remove name parameter of Thread in test_quick_connect().
* Fix/optimize test_asyncore.test_quick_connect() (#1188)Victor Stinner2017-04-191-39/+38
| | | | | | | | | | | | | | Don't use addCleanup() in test_quick_connect() because it keeps the Thread object alive and so @reap_threads fails on its timeout of 1 second. "./python -m test -v test_asyncore -m test_quick_connect" now takes 185 ms, instead of 11 seconds. Other minor changes: * Use "with sock:" to close the socket instead of try/finally: sock.close() * Use self.skipTest() in test_quick_connect() to remove one indentation level and notice user that the test is specific to AF_INET and AF_INET6
* bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. (#462)Ned Deily2017-03-041-0/+3
| | | | | | | * bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS Skip some tests of select.poll when running on macOS due to unresolved issues with the underlying system poll function on some macOS versions.
* Issue #28683: Fix the tests that bind() a unix socket and raise PermissionErrorXavier de Gaye2016-12-141-1/+3
| | | | on Android for a non-root user.
* Adds test.support.PGO and skips tests that are not useful for PGO.Steve Dower2016-09-071-0/+3
|
* (Merge 3.4) Issue #11453, #18174: Fix leak of file descriptor in test_asyncoreVictor Stinner2014-07-281-0/+4
|\
| * Issue #11453, #18174: Fix leak of file descriptor in test_asyncoreVictor Stinner2014-07-281-0/+4
| |
* | Issue #21566: Make use of socket.listen() default backlog.Charles-François Natali2014-07-231-1/+1
| |
* | (Merge 3.4) Issue #11453: asyncore: emit a ResourceWarning when an unclosedVictor Stinner2014-06-271-0/+16
|\ \ | |/ | | | | | | file_wrapper object is destroyed. The destructor now closes the file if needed. The close() method can now be called twice: the second call does nothing.
| * Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapperVictor Stinner2014-06-271-0/+16
| | | | | | | | | | object is destroyed. The destructor now closes the file if needed. The close() method can now be called twice: the second call does nothing.
* | (Merge 3.4) Closes #21582: Cleanup test_asyncore. Patch written by diana.Victor Stinner2014-06-271-36/+17
|\ \ | |/ | | | | | | | | - Use support.captured_stderr() where appropriate - Removes some "from test.support import xxx" import and uses support.xxx instead.
| * Closes #21582: Cleanup test_asyncore. Patch written by diana.Victor Stinner2014-06-271-36/+18
| | | | | | | | | | | | - Use support.captured_stderr() where appropriate - Removes some "from test.support import xxx" import and uses support.xxx instead.
* | fix isuse #13248: remove previously deprecated asyncore.dispatcher ↵Giampaolo Rodola'2014-04-291-17/+0
| | | | | | | | __getattr__ cheap inheritance hack.
* | Issue #7221: remove redundant tests in test_asyncore. Patch by Jessica ↵Antoine Pitrou2014-04-191-6/+1
|/ | | | McKellar.
* Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-1/+6
| | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as ↵Antoine Pitrou2013-08-211-3/+2
| | | | possible, since "localhost" goes through a DNS lookup under recent Windows versions.
* Issue #17992: Add timeouts to asyncore and asynchat tests so that they won't ↵Giampaolo Rodola'2013-05-161-3/+10
| | | | accidentally hang.
* test_asyncore: wait explicitly for a thread termination (this dangling threadCharles-François Natali2013-01-131-1/+1
|\ | | | | | | could be the cause of a random failure).
| * test_asyncore: wait explicitly for a thread termination (this dangling threadCharles-François Natali2013-01-131-1/+1
| |\ | | | | | | | | | could be the cause of a random failure).
| | * test_asyncore: wait explicitly for a thread termination (this dangling threadCharles-François Natali2013-01-131-0/+1
| | | | | | | | | | | | could be the cause of a random failure).
* | | #16896: merge with 3.3.Ezio Melotti2013-01-101-16/+8
|\ \ \ | |/ /
| * | #16896: test_asyncore now works with unittest test discovery. Patch by ↵Ezio Melotti2013-01-101-16/+8
| | | | | | | | | | | | Zachary Ware.
* | | Issue #16717: get rid of socket.error, replace with OSErrorAndrew Svetlov2012-12-181-3/+3
|/ /
* | Set a time threshold in test_asyncore.capture_server so that tests don'tKristján Valur Jónsson2012-04-061-3/+4
| | | | | | | | deadlock if the main thread fails before sending all the data.
* | attempt to fix asyncore buildbot failureGiampaolo Rodola'2012-03-231-5/+9
|\ \ | |/
| * attempt to fix asyncore buildbot failureGiampaolo Rodola'2012-03-231-3/+7
| |
* | fix failing asyncore test as per http://bugs.python.org/issue10340#msg156586Giampaolo Rodola'2012-03-231-10/+12
| |
* | merge 79422b3684f1 in 3.3 branch (issue 10340)Giampaolo Rodola'2012-03-221-0/+16
|\ \ | |/
| * fix #10340: properly handle EINVAL on OSX and also avoid to call ↵Giampaolo Rodola'2012-03-221-0/+16
| | | | | | | | handle_connect() in case of a disconnetected socket which is not meant to connect.
| * Merged revisions 88604 via svnmerge fromGiampaolo Rodolà2011-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88604 | giampaolo.rodola | 2011-02-25 21:05:48 +0100 (ven, 25 feb 2011) | 1 line (issue 11214) - fix asyncore.strerror test failure on AIX ........
* | test_asyncore: Actually try to received OOB data.Charles-François Natali2011-11-021-0/+1
| |
* | test_asyncore: Enable tests of Unix domain sockets with poll().Charles-François Natali2011-10-311-2/+9
| |
* | Issue #5661: on EPIPE/ECONNRESET, OS X returns the FD with the POLLPRI flag...Charles-François Natali2011-10-291-0/+4
| |
* | Issue #5661: Add a test for ECONNRESET/EPIPE handling to test_asyncore. PatchCharles-François Natali2011-10-291-0/+28
| | | | | | | | by Xavier de Gaye.
* | Issue #12656: Really fix test_asyncore failures on Windows buildbots...Charles-François Natali2011-08-241-1/+2
| |
* | Issue #12656: Fix test_asyncore failures on Windows buildbots.Charles-François Natali2011-08-241-5/+7
| |
* | Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore.Charles-François Natali2011-08-241-46/+85
| |
* | Issue 11177: asyncore's create_socket() arguments can now be omitted.Giampaolo Rodolà2011-02-251-10/+10
| |
* | (issue 11214) - fix asyncore.strerror test failure on AIXGiampaolo Rodolà2011-02-251-1/+1
|/
* #10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and ↵Ezio Melotti2010-12-011-2/+2
| | | | assertRaisesRegex.
* fix leaking socketsBenjamin Peterson2010-10-311-0/+2
|
* have test_asyncore properly close files.Brett Cannon2010-10-291-2/+4
|