summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncore.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-92169: Use warnings_helper.import_deprecated() to import deprecated ↵Hugo van Kemenade2022-05-031-4/+1
| | | | modules uniformly in tests (GH-92170)
* bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)Christian Heimes2022-03-221-0/+2
| | | | | | | | | | | - Add requires_fork and requires_subprocess to more tests - Skip extension import tests if dlopen is not available - Don't assume that _testcapi is a shared extension - Skip a lot of socket tests that don't work on Emscripten - Skip mmap tests, mmap emulation is incomplete - venv does not work yet - Cannot get libc from executable The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
* Revert "bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)" ↵Victor Stinner2021-12-071-0/+841
| | | | | (GH-29951) This reverts commit 9bf2cbc4c498812e14f20d86acb61c53928a5a57.
* bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)Victor Stinner2021-11-151-841/+0
| | | | | | | | | | | | | | | | Remove the asyncore and asynchat modules, deprecated in Python 3.6: use the asyncio module instead. Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd module can be used instead, it is based on asyncio. * Remove asyncore, asynchat and smtpd documentation * Remove test_asyncore, test_asynchat and test_smtpd * Rename Lib/asynchat.py to Lib/test/support/_asynchat.py * Rename Lib/asyncore.py to Lib/test/support/_asyncore.py * Rename Lib/smtpd.py to Lib/test/support/_smtpd.py * Remove DeprecationWarning from private _asyncore, _asynchat and _smtpd modules * _smtpd: remove deprecated properties
* bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in ↵Irit Katriel2021-06-241-1/+5
| | | | tests (GH-26905)
* bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)Christian Heimes2020-11-201-1/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-40275: Use new test.support helper submodules in tests (GH-21449)Hai Shi2020-08-031-12/+14
|
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-271-4/+5
|
* 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.